05.04.2014, 15:55
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.
On your sscanf add:
Quote:
new time; if(sscanf(params, "ud", ID, time)) return SendClientMessage(playerid, COLOR_ERROR, "Usage: /ar [ID] [minutes]"); |
Quote:
PlayerInfo[ID][pJailTime] = time * 60; |
Quote:
Timer:JailTimer[1000]() // The tickrate 1 second { foreach(Player, i) { if(PlayerInfo[i][pJailTime] > 0) { PlayerInfo[i][pJailTime] --; } } } |
I just gave the idea.