30.12.2010, 14:45
pawn Код:
new JailTime[MAX_PLAYERS];
pawn Код:
SetTimer("JailTimer", 1000, true);
pawn Код:
forward JailTimer();
public JailTimer()
{
for(new i=0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(JailTime[i] > 0)
{
JailTime[i]--;
if(JailTime[i] == 0)
{
// release player from jail
}
}
}
}
}
pawn Код:
JailTime[playerid] = 3600;
Save JailTime[playerid] with dini.