Timer on command
#14

pawn Код:
new timertest[MAX_PLAYERS];
forward Timer1();

public OnFilterScriptInit(){
    SetTimer("Timer1",59302,1);
    return 1;
}
onplayercommandtext:
pawn Код:
if (strcmp("/usecanon", cmdtext, true, 9) == 0)
    {
    if (timertest[playerid] == 0)
    {
    if (IsPlayerInRangeOfPoint(playerid, 1, -1367.8082,-2327.3691,43.6029))
    {
            GivePlayerWeapon(playerid, 35, 1);
            timertest[playerid] = 1;
    }
    }
    return 1;
}
public:
pawn Код:
public Timer1()
{
    for(new playerid; playerid < MAX_PLAYERS;playerid++)
    {
        if (timertest[playerid] == 1)
        {
            timertest[playerid] = 0;
        }
    }
        return 1;
}
would also be good... just another way so you don't have to set 500 timers..
Reply


Messages In This Thread
Timer on command - by Galcio - 24.02.2010, 10:24
Re: Timer on command - by aircombat - 24.02.2010, 10:36
Re: Timer on command - by GaGlets(R) - 24.02.2010, 10:44
Re: Timer on command - by Galcio - 24.02.2010, 11:00
Re: Timer on command - by Razvann - 24.02.2010, 11:02
Re: Timer on command - by Galcio - 24.02.2010, 11:06
Re: Timer on command - by VonLeeuwen - 24.02.2010, 11:07
Re: Timer on command - by MenaceX^ - 24.02.2010, 11:11
Re: Timer on command - by VonLeeuwen - 24.02.2010, 11:13
Re: Timer on command - by Galcio - 24.02.2010, 11:17
Re: Timer on command - by VonLeeuwen - 24.02.2010, 11:18
Re: Timer on command - by Gamer_Z - 24.02.2010, 11:43
Re: Timer on command - by GaGlets(R) - 24.02.2010, 11:46
Re: Timer on command - by Gamer_Z - 24.02.2010, 12:37
Re: Timer on command - by VonLeeuwen - 24.02.2010, 12:40
Re: Timer on command - by Galcio - 24.02.2010, 15:22
Re: Timer on command - by Galcio - 24.02.2010, 16:21
Re: Timer on command - by GaGlets(R) - 24.02.2010, 16:35
Re: Timer on command - by Galcio - 24.02.2010, 16:47
Re: Timer on command - by Joe Staff - 24.02.2010, 17:11
Re: Timer on command - by Galcio - 24.02.2010, 17:26
Re: Timer on command - by Gamer_Z - 25.02.2010, 05:42

Forum Jump:


Users browsing this thread: 2 Guest(s)