15.05.2014, 12:06
An Example:
Taken from the SA-MP Wiki.^
pawn Код:
public OnPlayerUpdate(playerid)
{
new Keys,ud,lr;
GetPlayerKeys(playerid,Keys,ud,lr);
if(ud == KEY_UP) SendClientMessage(playerid, -1, "UP");
else if(ud == KEY_DOWN) SendClientMessage(playerid, -1, "DOWN");
if(lr == KEY_LEFT) SendClientMessage(playerid, -1, "LEFT");
else if(lr == KEY_RIGHT) SendClientMessage(playerid, -1, "RIGHT");
return 1;
}