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
#2

You put the Timer under ongamemode init.
And the public goes under nothing.

/Artix
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)