How to disable the option for key pressing
#5

Quote:
Originally Posted by HY
Посмотреть сообщение
pawn Код:
#define PRESSED(%0) \
    (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(PRESSED(KEY_YES))
    {
        // Functions here.
        SetPlayerPos(playerid, 0.0, 0.0, 0.0); // If pressed Y, teleport him here. for example.
    }
    return 1;
}
OnPlayerKeyStateChange(playerid, newstate, oldstate)

SA-MP Keys
That I saw on the samp wiki but that wont help me I need something like

Код:
if(KeyCode_F12 == PRESSED)
{
//Do the Thing
}

Basically this will see if the Key on the Keyboard 'F12" is pressed, when it is do something within the "IF".
I need it for like when a player Uses F12 Key and stuff, The "Y" key was a example...
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)