Changing the way you enter into a door using a button or automattly?
#4

Quote:
Originally Posted by HY
Посмотреть сообщение
pawn Код:
#define PRESSED(%0) \
    (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
   
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if (PRESSED( KEY_FIRE )) // If pressed KEY_FIRE (LMB)
    {
        if(IsPlayerInRangeOfPoint(playerid, RANGE, X,Y,Z)) // Range = Distance when he can press KEY_FIRE, X,Y,Z : Checkpoint/Pick-up/Door position !
        SetPlayerInterior(playerid, 15); // Will set his interior 15, example !
    }
    return 1;
}
https://sampwiki.blast.hk/wiki/OnPlayerKeyStateChange
Alright thanks, I will try to do it. By the way can you tell me the name of the button that you steal cars ENTER/F?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)