Keep player in 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: Keep player in vehicle (
/showthread.php?tid=96706)
Keep player in vehicle -
Vollzeitfan - 10.09.2009
Hi,
I need to keep a player in the vehicle, so that he can't leave it. Is there anyway to do this?
I don't have a clue how to manage this so any help would be welcome...
Re: Keep player in vehicle -
Calgon - 10.09.2009
pawn Код:
new LastCar[MAX_PLAYERS];
public OnPlayerEnterVehicle(playerid, vehicleid)
{
LastCar[playerid] = vehicleid;
return 1;
}
public OnPlayerStateChange(playerid,newstate,oldstate)
{
if(newstate == 0 && oldstate == 2)
{
PutPlayerInVehicle(playerid, vehicleid, 0);
}
}