27.07.2012, 18:25
Yep, adding RemovePlayerFromVehicle under OnPlayerEnterVehicle won't work at all.
I recommend using SetVehicleParamsForPlayer under OnVehicleStreamIn. Example:
I recommend using SetVehicleParamsForPlayer under OnVehicleStreamIn. Example:
pawn Code:
public OnVehicleStreamIn(vehicleid, forplayerid)
{
if(vehicleid == YourVehicleIDHere) // if the vehicle that streams in is the vehicle you want to lock (Change YourVehicleIDHere)
{
if(forplayerid == ThePlayerIDHere) // if the player that the vehicle streams in for is the player you want to stop from entering the vehicle (Change ThePlayerIDHere)
{
SetVehicleParamsForPlayer(vehicleid, forplayerid, 0, 1); // lock the doors for the player
}
}
return 1;
}