SA-MP Forums Archive
Vehicle Lock doesn't work - 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 Lock doesn't work (/showthread.php?tid=208399)



Vehicle Lock doesn't work - pantelimonfl - 08.01.2011

I want to lock some vehicles and i have this code but it doesn't work.
Code:
for(new i = 0; i < MAX_PLAYERS; i++)
         {
	        if (IsPlayerConnected(i))
		{
			SetVehicleParamsForPlayer(barracks,i,0,1);
		}
	 }



Re: Vehicle Lock doesn't work - Mike Garber - 08.01.2011

https://sampwiki.blast.hk/wiki/SetVehicleParamsForPlayer

Read this again. The answer is there.


Re: Vehicle Lock doesn't work - Kwarde - 08.01.2011

omg I don't know what's wrong. It looks good.
Is the 'barracks' defined to an CreateVehicle / AddStaticVehicle or something else?


Re: Vehicle Lock doesn't work - pantelimonfl - 08.01.2011

Yes it is.


Re: Vehicle Lock doesn't work - Mike Garber - 08.01.2011

I know what's wrong.
But I will not tell you as the very first thing you should do is to check the Wiki, BEFORE asking questions.
The answer is there, in my link i posted above.


Re: Vehicle Lock doesn't work - Kwarde - 08.01.2011

Oyeah that was it

Quote:

Note: You will have to respawn the vehicle to properly remove the objective.

Quote:

Note: From 0.3 you will have to re-apply this function when OnVehicleStreamIn is called!