Jump to content
  • 0

pomoc Auto


lekpri

Dotaz

Ahoj lidičky

Potřebuji poradit, nevím si rady.

 

Potřebuji udělat v pawnu nezničitelné auto.

Myslím to tak že když nabourám nebo začne hořet, samo se opraví. Potřebuji to na stunt atd. 

Hledal jsem to, ale nic pořádného jsem nenašel. 

 

Moc Vás prosím o radu.

 

Děkuj 

Link to comment
Share on other sites

3 odpovědí na tuto otázku

Recommended Posts

  • 0



Do OnPlayerConnect dej:
SetTimerEx("Autorepair",500,true,"d",playerid);

A na tento timer si vytvoř public pro opravení auta:

forward Autorepair(playerid);
public Autorepair(playerid)
{
if(IsPlayerInAnyVehicle(playerid))
{
new Float:health,vehicleid;
vehicleid = GetPlayerVehicleID(playerid);
GetVehicleHealth(vehicleid,health);
if(health <250)
{
SetVehicleHealth(vehicleid,1000);
}
}
}


Link to comment
Share on other sites

  • 0

Děkuji 

No ale, nevím stejně kam -       A na tento timer si vytvoř public pro opravení auta:  dát


jo trochu to chápu jde to no, ale auto je zničené, šlo by to ještě tak,. aby se i auto opravilo? Myslím jako karosérie.

Jinak dík za pomoc 

Link to comment
Share on other sites

  • 0

 

Do OnPlayerConnect dej:
SetTimerEx("Autorepair",500,true,"d",playerid);

A na tento timer si vytvoř public pro opravení auta:

forward Autorepair(playerid);
public Autorepair(playerid)
{
  if(IsPlayerInAnyVehicle(playerid))
  {
   new Float:health,vehicleid;
   vehicleid = GetPlayerVehicleID(playerid);
   GetVehicleHealth(vehicleid,health);
   if(health <250)
   {
   SetVehicleHealth(vehicleid,1000);
   }
  }
 }

 

Miesto SetVehicleHealth by som dal :

RepairVehicle(vehicleid); 

To ti opaví aj vozidlo vzhladovo aj health nastaví na 1000 . 

 

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...