11.01.2015, 13:25
Using OnPlayerKeyStateChange. Here is an example of what happens when a player presses the F key
You can view a list of keys and their names,
https://sampwiki.blast.hk/wiki/Keys
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys & KEY_SECONDARY_ATTACK)
{
SendClientMessage(playerid, -1, "You pressed the F key!");
}
return 1;
}
https://sampwiki.blast.hk/wiki/Keys