SA-MP Forums Archive
Block getting out of vehicle - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Block getting out of vehicle (/showthread.php?tid=105610)



Block getting out of vehicle - xomka - 30.10.2009

Now I would like to ask, how it can be blocked? Tried to return (0) in OnPlayerExitVehicle, but it does nothing.


Re: Block getting out of vehicle - Correlli - 30.10.2009

Use GetPlayerVehicleSeat to check if exiting player was on the driver seat (seat-ID 0) and put him back into this vehicle.

pawn Код:
public OnPlayerExitVehicle(playerid, vehicleid)
{
  if(GetPlayerVehicleSeat(playerid) == 0) PutPlayerInVehicle(playerid, vehicleid, 0);
  return 1;
}