SA-MP Forums Archive
two questions - 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)
+--- Thread: two questions (/showthread.php?tid=424275)



two questions - dominik523 - 21.03.2013

Hey! I have my RP gm and I created car dealership where I put few cars which I want to be locked. What is the easiest way to do that?
And is there some way how can I check how many pickups can my server have? I mean like houses etc. I've seen somewhere that information depends on streamer which I'm using but I'm not sure.


Re: two questions - Misiur - 21.03.2013

https://sampwiki.blast.hk/wiki/Limits - built in limits, for streamer limits visit your streamer plugin topic
https://sampwiki.blast.hk/wiki/SetVehicleParamsEx - doors set to 1 lock car doors


Re: two questions - dominik523 - 21.03.2013

thanks bro


Re: two questions - dominik523 - 21.03.2013

under which callback can I put SetVehicleParamsEx in my gm, so every time when I start my server, vehicle will be lock for every player that connects? And should I put somethig like:
car1 = CreateVehicle(all parameters);
car2 = ....
and then under some callback
SetVehicleParamsEx(car1, engine, lights, alarm, doors, bonnet, boot, objective);


Re: two questions - Misiur - 21.03.2013

You can use it directly after CreateVehicle:

pawn Код:
new engine, lights, alarm, doors, bonnet, boot, objective;
car1 = CreateVehicle(all parameters);
GetVehicleParamsEx(car1, engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(car1, engine, lights, alarm, 1, bonnet, boot, objective);

car2 = CreateVehicle(all parameters);
GetVehicleParamsEx(car2, engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(car2, engine, lights, alarm, 1, bonnet, boot, objective);
Or force the settings
pawn Код:
car1 = CreateVehicle(all parameters);
SetVehicleParamsEx(car1, 0, 0, 0, 1, 0, 0, 0);

car2 = CreateVehicle(all parameters);
SetVehicleParamsEx(car2, 0, 0, 0, 1, 0, 0, 0);



Re: two questions - dannyk0ed - 21.03.2013

Or under OnVehicleSpawn.


Re: two questions - dominik523 - 21.03.2013

thanks guys for your replies