How to indentify user press a key?
#3

Using OnPlayerKeyStateChange. Here is an example of what happens when a player presses the F key


pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys & KEY_SECONDARY_ATTACK)
    {
        SendClientMessage(playerid, -1, "You pressed the F key!");
    }
    return 1;
}
You can view a list of keys and their names,

https://sampwiki.blast.hk/wiki/Keys
Reply


Messages In This Thread
How to indentify user press a key? - by vinnythebest - 11.01.2015, 13:19
Re: How to indentify user press a key? - by zT KiNgKoNg - 11.01.2015, 13:24
Re: How to indentify user press a key? - by FunnyBear - 11.01.2015, 13:25
Re: How to indentify user press a key? - by vinnythebest - 11.01.2015, 13:35

Forum Jump:


Users browsing this thread: 1 Guest(s)