[HELP]Vehicles Don't Lock onplayerspawn
#1

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
Reply
#2

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

OnVehicleStreamIn
Reply
#4

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

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?
Reply
#6

change playerid to forplayerid
Reply
#7

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*.
Reply
#8

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

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?
Reply
#10

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


Forum Jump:


Users browsing this thread: 6 Guest(s)