[Help] Enterance
#3

Quote:
Originally Posted by PaulDinam
Посмотреть сообщение
OnPlayerKeyStateChange
enough said
*Claps*
Don't bother helping if that's your way of helping. I bet you won't appreciate it yourself if people did that with you.

I will continue with what he stated.
You will need to check if the player presses the F button when he's in range of any business/house entrance.

That check is triggered with "OnPlayerKeyStateChange".
I recommend you to browse through the Sa-MP wiki and see how the callback is used.

Here's an example code:
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys == KEY_ACTION) // I think this is the "F" key (by default)
    {
        //do something here
    }
    return 1;
}
Here are the links to the SA-MP wiki:

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


Messages In This Thread
[Help] Enterance - by Swager98 - 01.06.2014, 21:23
Re: [Help] Enterance - by PaulDinam - 01.06.2014, 22:07
Re: [Help] Enterance - by AndySedeyn - 01.06.2014, 22:31

Forum Jump:


Users browsing this thread: 1 Guest(s)