22.08.2015, 18:40
It's not counting down it just spamming numbers and i want to add a 30 timer.
inside my work command
Код:
forward TruckCheck(playerid); public TruckCheck(playerid) { if (IsPlayerInAnyVehicle(playerid) == 0) { const time = 10; //This would be 10sec //GameTextForPlayer(playerid,!"Get back in your TRUCK!~n~Or Reconnect your trailer!~n~[10]",1000,5); @countdown(playerid,time); return 1; } else if (IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)) == 0) { GameTextForPlayer(playerid, "Reconnect your trailer!", 1000, 5); return 1; } return 0; } @countdown(playerid,x);@countdown(playerid,x) { if(--x == 0) return GameTextForPlayer(playerid,!"Los Los Los!",1000,5); new str[8]; valstr(str,x); GameTextForPlayer(playerid,str,1000,5); return SetTimerEx(!"@countdown",999,0,!"ii",playerid,x); }
Код:
SetTimerEx("TruckCheck", 1000, true, "i", playerid);