Setting a timer to unjail, help
#2

A variable for jailing the player:
pawn Код:
new jailed[MAX_PLAYERS]; // Put it on script top (global variable)
forward UnJail();
On the command, after setting player position (jailing him), put that:
pawn Код:
jailed[toplayer] = 1;
Also a timer:
pawn Код:
SetTimer("UnJail",180000,false); // 60000ms = 1min || 180000 = 3min
Also the cllback function:
pawn Код:
public UnJail()
{
   for(new v; v < MAX_PLAYERS; v++)
   {
         if(jailed[v] == 1)
         {
              SetPlayerPos(v, x, y, z); // Change x y z  for the position you want the players go after unjailed
              jailed[v] = 0;
         }
    return 1;
    }
Reply


Messages In This Thread
Setting a timer to unjail, help - by ricardo178 - 13.03.2011, 14:48
Re: Setting a timer to unjail, help - by blackwave - 13.03.2011, 15:00
Re: Setting a timer to unjail, help - by ricardo178 - 13.03.2011, 15:16

Forum Jump:


Users browsing this thread: 2 Guest(s)