How do i make the timers work - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How do i make the timers work (
/showthread.php?tid=138511)
How do i make the timers work -
xLowrider - 02.04.2010
I'm looking to make a timer that makes your car HP go to 1000 every 3 seconds
Re: How do i make the timers work -
Drake1994 - 02.04.2010
Code:
forward VehicleRepair(playerid);
public VehicleRepaire(playerid)
{
RepairVehicle(GetPlayerVehicleID(playerid));
SetVehicleHealth(GetPlayerVehicleID(playerid),1000.0);
{
OnGameModeInit:
Code:
SetTimer("VehicleRepair",3000,false);
Re: How do i make the timers work -
thiaZ_ - 02.04.2010
pawn Code:
forward RepairVehicle();
public RepairVehicle() {
for(new i; i<MAX_PLAYERS; i++) {
if(IsPlayerInAnyVehicle(i)) {
RepairVehicle(GetPlayerVehicleID(i));
}
}
return true;
}
//...
SetTimer("RepairVehicle", 3000, true);