05.04.2014, 13:03
(
Последний раз редактировалось vassilis; 27.01.2015 в 04:12.
)
fixed
new time; if(sscanf(params, "ud", ID, time)) return SendClientMessage(playerid, COLOR_ERROR, "Usage: /ar [ID] [minutes]"); |
PlayerInfo[ID][pJailTime] = time * 60; |
Timer:JailTimer[1000]() // The tickrate 1 second { foreach(Player, i) { if(PlayerInfo[i][pJailTime] > 0) { PlayerInfo[i][pJailTime] --; } } } |
In my script i made a PlayerInfo [playerid][pJailTime] in enum.
On your sscanf add: then on your command /arrest: for counting down the jailtime i used y_timers then set when pJailTime == 0 so set a spawn point. I just gave the idea. |