PutPlayerInVehicle
#1

When PutPlayerInVehicle is used on a player that's in a vehicle, they stay in that vehicle for other players until that vehicle is destroyed.

Very annoying bug.
Reply
#2

Possible temporary fix, if you don't already use. Also would fix the bug of putting a player in any seat that someone else is already in.

pawn Code:
// Has to go before all the PutPlayerInVehicle's, or you can manually rename all them to whatever.
public SafePutPlayerInVehicle(playerid, vehicleid, seatid)
{
    foreach(Player, i)
    {
        if(GetPlayerVehicleID(i) == vehicleid && GetPlayerVehicleSeat(i) == seatid)
        {
            return 0;
        }
    }
    PutPlayerInVehicle(playerid, vehicleid, seatid);
    return 1;
}

#define PutPlayerInVehicle SafePutPlayerInVehicle
Reply
#3

There's also an issue using PutPlayerInVehicle when using special actions, such as smoking and drinking. It teleports the player out of the vehicle immediately. Note that before someone mentions it, using SPECIAL_ACTION_NONE before the function call does nothing.
Reply
#4

We had the same issue, with the new beer and ciggy actions. Players would not be put in their vehicles.
Just a shame we have to remove their actions before putting them in a vehicle.
Code:
  xInfo[playerid][vehicle]=vehicleid;
  SetPlayerSpecialAction(playerid,0);
  PutPlayerInVehicle(playerid,vehicleid,seat);
  return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)