How to indentify user press a key?
#1

Hi,
I've this request. How the server can indentify user press a any key?
I need it for a "alert" of user, after control of S-obeit on my Server.
Reply
#2

Try using ******.... These are the keys that you're able to use in SA-MP (script side) other than that its not possible without a server and client side plugin (https://sampwiki.blast.hk/wiki/Keys).
Reply
#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
#4

Solved, with DIALOG_STYLE_MSGBOX the user can't press a keys and he can wait a finish of control
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)