01.06.2014, 22:31
*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:
Here are the links to the SA-MP wiki:
https://sampwiki.blast.hk/wiki/OnPlayerKeyStateChange
https://sampwiki.blast.hk/wiki/Keys
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;
}
https://sampwiki.blast.hk/wiki/OnPlayerKeyStateChange
https://sampwiki.blast.hk/wiki/Keys