14.09.2009, 00:13
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!"); } } } } |