initilize timer
#1

amm how i can initialize a timer for check that where can put, in gamemodeinit? or onplayerconnect??xd
Quote:
Originally Posted by example samp
The following example shows how you can regularly check (using a timer) if a player presses the Up key (usually W)

public SomeTimer()
{
new keys, updown, leftright;
for(new playerid = 0; playerid < MAX_PLAYERS; playerid++)
{
if(IsPlayerConnected(playerid))
{
GetPlayerKeys(playerid, keys, updown, leftright);

if(updown == KEY_UP)
{
SendClientMessage(playerid, 0xFF0000AA, "Up key pressed!");
}
}
}
}
Reply


Messages In This Thread
initilize timer - by [SOB]Chris - 14.09.2009, 00:13
Re: initilize timer - by Doppeyy - 14.09.2009, 02:54

Forum Jump:


Users browsing this thread: 1 Guest(s)