SA-MP Forums Archive
[HELP]Vehicles Don't Lock onplayerspawn - 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: [HELP]Vehicles Don't Lock onplayerspawn (/showthread.php?tid=166552)



[HELP]Vehicles Don't Lock Right (Still Unfixed) - [SCRP]Cody - 09.08.2010

I'm currently editing a roleplay script for Streamwood County RP. I don't know why but when i put all the setvehicleparams for the vehicles i want locked under onplayerspawn, they don't do anything. The player has to type /civilian to get them to lock. All the vehicles are locked to factions and are unlocked when they log into them. Where should I put the setvehicleparams to make them lock when the player spawns?

Any help would be appreciated and I'm sorry if someone has posted about this before, I couldn't find any help for this actually searching for it first.

-[SCRP]Cody


Re: [HELP]Vehicles Don't Lock onplayerspawn - (.Aztec); - 09.08.2010

You have to lock vehicles in "public OnVehicleStreamIn(vehicleid, forplayerid)"


Re: [HELP]Vehicles Don't Lock onplayerspawn - Daren_Jacobson - 09.08.2010

OnVehicleStreamIn


Re: [HELP]Vehicles Don't Lock onplayerspawn - Lorenc_ - 09.08.2010

https://sampforum.blast.hk/showthread.php?tid=163764


Re: [HELP]Vehicles Don't Lock onplayerspawn - [SCRP]Cody - 09.08.2010

Now when I paste all of the setvehicleparams under that, it gives me errors going

(Error) undefined symbol "playerid"
That happens when the line is like this
SetVehicleParamsForPlayer(1, playerid, 0, 1);

Any idea how to fix that? Do I need to edit something to make it work for the onvehiclestreamin since it works fine everywhere else?


Re: [HELP]Vehicles Don't Lock onplayerspawn - Faith - 09.08.2010

change playerid to forplayerid


Re: [HELP]Vehicles Don't Lock onplayerspawn - ikey07 - 09.08.2010

Quote:
Originally Posted by [SCRP]Cody
Посмотреть сообщение
Now when I paste all of the setvehicleparams under that, it gives me errors going

(Error) undefined symbol "playerid"
That happens when the line is like this
SetVehicleParamsForPlayer(1, playerid, 0, 1);

Any idea how to fix that? Do I need to edit something to make it work for the onvehiclestreamin since it works fine everywhere else?
*bumb*

my first *bump*, but I never use *bumb*.


Re: [HELP]Vehicles Don't Lock onplayerspawn - Daren_Jacobson - 09.08.2010

why did you bump it? a fix was posted already.


Re: [HELP]Vehicles Don't Lock onplayerspawn - [SCRP]Cody - 09.08.2010

Alright, thanks for the help guys, I got it figured out now.

Edit-Nevermind, we have a new problem, since you logging into a faction is supposed to unlock the vehicles. It does, but only for a little bit since putting it under onvehiclestreamin causes them to relock when you go barely away. Is there any way to lock them onplayerspawn so they don't do that?


Re: [HELP]Vehicles Don't Lock onplayerspawn - [SCRP]Cody - 10.08.2010

Anyone? This is an extremely annoying thing to have to deal with. I really want it fixed.