View Full Version : PutPlayerInVehicle

23/11/2009, 10:22 PM
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.

26/11/2009, 11:35 PM
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.

// 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

27/11/2009, 12:31 PM
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.

27/11/2009, 04:28 PM
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.
return 1;