Never worked with timers so help me please
#1

Hello,

I wanna make a timer for zombies, that if they just used ALT to bite someone they have to wait 30 secs.

pawn Код:
new NearestPlayer = GetClosestPlayer(playerid);
    if(newkeys & KEY_WALK)
    {
        if(Player[playerid][Zombie] == 1)
        {
            if(GetDistanceBetweenPlayers(NearestPlayer, playerid) < 4)
            {
                if(Player[NearestPlayer][Infected] == 0)
                {
                    Player[NearestPlayer][Infected] = 1;
                }
                else if(Player[NearestPlayer][Infected] == 1)
                {
                    Player[NearestPlayer][Zombie] = 1;
                    Player[NearestPlayer][Human] = 0;
                    Player[NearestPlayer][Infected] = 0;
                }
            }
            else
            {
                GameTextForPlayer(playerid, "~w~There is no one nearby!", 3500, 3);
            }
        }
    }
Anyone can help me with that timer?
Reply


Messages In This Thread
Never worked with timers so help me please - by Stefand - 24.06.2012, 13:28
Re: Never worked with timers so help me please - by [KHK]Khalid - 24.06.2012, 15:01

Forum Jump:


Users browsing this thread: 1 Guest(s)