Command !! Help !!
#1

how to make on player go to destination and press F and player teleporting to interior ?
Reply
#2

Use OnPlayerKeyStateChange
Reply
#3

EDIT:
pawn Код:
public OnPlayerSpawn(playerid)
{
    SetPlayerCheckpoint(playerid, x, y, z, 3.0/*size*/);
    return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if (IsPlayerInCheckpoint(playerid))
    {
        if (PRESSED(KEY_SECONDARY_ATTACK.))//F key or Return Key(Enter Key)
        {
            if (IsPlayerInAnyVehicle(playerid))
            {
                return 1;
            }
            else
            {
                SetPlayerPos(playerid, x, y, z);
                SetPlayerInterior(playerid, interiorid);
            }
        }
    }
    else
    {
        return 1;
    }
    return 1;
}
Change the co-ordinates to your ones.
Reply
#4

Quote:
Originally Posted by Faisal_khan
Посмотреть сообщение
You cannot use Key_F
F (together with Return) happens to be the default key to enter a vehicle. KEY_SECONDARY_ATTACK.
Reply
#5

Quote:
Originally Posted by Vince
Посмотреть сообщение
F (together with Return) happens to be the default key to enter a vehicle. KEY_SECONDARY_ATTACK.
Hmm... Is that so... Thanks buddy. I did not knew that.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)