Quote:
Originally Posted by Pablo Borsellino
Here, without any timers 
At the top of the Script:
pawn Code:
new WaitTimeForCMD[MAX_PLAYERS];
OnPlayerCommandText:
pawn Code:
if(!strcmp("/vr", cmdtext, true)) { if(IsPlayerInAnyVehicle(playerid)) { if((GetTickCount()-WaitTimeForCMD[playerid])>120000)return SendClientMessage(playerid,RED,"ERROR: Wait 2Minutes to use this CMD again!"); new VehicleID; VehicleID = GetPlayerVehicleID(playerid); RepairVehicle(VehicleID); WaitTimeForCMD[playerid]=GetTickCount(); return SendClientMessage(playerid,YELLOW," Sucessfully Fixed The Vehicle "); } else return SendClientMessage(playerid,RED,"ERROR: You are not in a Vehicle!"); }
|
what is gettickcount is that settimer