Preventing classes from entering vehicles?
#1

I am trying to exclude a specific class from entering vehicles (Zombies)
Is there any function for this, I cannot find one.
Thanks
Reply
#2

You can either use OnPlayerEnterVehicle or OnPlayerStateChange:

pawn Code:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
        if(/* is player zombie variable */)
                 ClearAnimations(playerid);
    return 1;
}
or
pawn Code:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER)
    {
                if(/*IsPlayerZombie Variable*/)
                {
                     new Float: Pos[4];
                     GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
                     SetPlayerPos(playerid, Pos[0], Pos[1] + 2, Pos[2]);
                }
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)