Jump to content

Cerere tutorial.


kixu

Recommended Posts

  • 1 month later...

Faci un simplu timer pentru repair

Si la aia dupa ce o paraseste playeru

faci ceva in genu

[pawn]

public OnPlayerExitVehicle(playerid, vehicleid)

{

    SetVehicleToRespawn(GetPlayerVehicleID(playerid));

    return 1;

}

[/pawn]

Timerul l-ai putea face astfel

[pawn]

SetTimerEx("Autorepair",600,true,"d",playerid);

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);

  }

  }

}

[/pawn]

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.