Timer help!
#9

Quote:
Originally Posted by Pooh7
Посмотреть сообщение
Not what he wanted at all.

Quote:
Originally Posted by xRyder
Посмотреть сообщение
@Seven_of_Nine - Why not set the timer to repeate...? Instead of making it run over and
pawn Код:
new
    HelpTimer[MAX_PLAYERS];
   
command(help, playerid, params[])
{
    if(HelpTimer[playerid]) { KillTimer(HelpTimer[playerid]); HelpTimer[playerid] = 0; }
    else SetTimerEx("HelpFunction", 60 * 1000, true, "i", playerid);
    return 1;
}

forward HelpFunction(playerid);
public HelpFunction(playerid)
{
    SendClientMessage(playerid, 0x0, "Help message # 1.");
    return 1;
}
Should work, and wont spam the players.

Remember to kill the timer OnPlayerDisconnect.
Reply


Messages In This Thread
Timer help! - by IvancheBG - 14.04.2011, 15:56
Re: Timer help! - by xRyder - 14.04.2011, 16:04
Re: Timer help! - by IvancheBG - 14.04.2011, 16:06
Re: Timer help! - by Pooh7 - 14.04.2011, 16:10
Re: Timer help! - by Seven_of_Nine - 14.04.2011, 16:13
Re: Timer help! - by Cameltoe - 14.04.2011, 16:16
Re: Timer help! - by xRyder - 14.04.2011, 16:16
Re: Timer help! - by IvancheBG - 14.04.2011, 16:29
Re: Timer help! - by Cameltoe - 14.04.2011, 16:29
Re: Timer help! - by IvancheBG - 14.04.2011, 16:35

Forum Jump:


Users browsing this thread: 3 Guest(s)