SA-MP Forums Archive
Why? - 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: Why? (/showthread.php?tid=97704)



Why? - Jason_Larson - 16.09.2009

What is the reasoning behind changing the way vehicles are locked, and setvehicleplate?

Cause I have over 300 vehicles that require locking and no one has supplied the way to lock numerous vehicles. I've been given ideas, but none have worked. Also my script really needs setvehicleplate.


Re: Why? - Jasen - 16.09.2009

To lock vehicles, just use SetVehiclePrams on OnVehicleStreamIn. Simple


Re: Why? - Calgon - 16.09.2009

You can simply re-apply the lock (using SetVehicleParams), everytime it streams in. You just need to create an additional variable, to clarify that it needs to be locked once streamed in for another player.

pawn Код:
new Locked[MAX_PLAYERS];
Then re-apply the SetVehicleParams if Locked is 1.


Re: Why? - G_ROW_Chez - 16.09.2009

add if(Locked[vehicleid]) into OnVehicleStreamLn
and in timer https://sampwiki.blast.hk/wiki/IsVehicleStreamedIn with setting params for player in cycle


Re: Why? - Jason_Larson - 16.09.2009

May be simple to you, although every time I've tried doing this, and every person gives me different ideas it failes. I understand almost everything else, except this haha.


Say I have 1 - 25 that need to be locked for anyone else but <desiredname> how would this be accomplished? Cause right now to unlock vehicles for the desired name, say I type /loginlspd below that command in the line of code would be "UnlockLSPDCars" and it unlocked the id's I provide in a line such as

Unlock<Name>cars
Setveh.....1,0
....
setveh.....15,0

ect


Re: Why? - Jason_Larson - 17.09.2009

See, it is easy to lock one... but not alot lol


Re: Why? - TMasters - 17.09.2009

look, you use normal lock unlock, just add that it should be reapplied when vehicle streams in and thats it