SA-MP Forums Archive
Vehicle not locking properly - 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: Vehicle not locking properly (/showthread.php?tid=194833)



Vehicle not locking properly - Jochemd - 30.11.2010

Hello,

pawn Code:
public OnVehicleStreamIn(vehicleid, forplayerid)
{
    if(VehicleInfo[vehicleid][Locked] == 0) SetVehicleParamsForPlayer(vehicleid,forplayerid,0,1);
    else SetVehicleParamsForPlayer(vehicleid,forplayerid,0,0);
    return 1;
}
This does not lock the vehicle, even if VehicleInfo[vehicleid][Locked] is 1. Why??

Regards, Jochem


Re: Vehicle not locking properly - RSX - 30.11.2010

Put test marks such as print, only then ask.


Re: Vehicle not locking properly - Jakku - 01.12.2010

SetVehicleParamsForPlayer(vehicleid,forplayerid,0,1);
1 = Locks the vehicle.

If your locked- variable is set to 0, it will lock the vehicle.