SA-MP Forums Archive
spawned car creating multiple - 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: spawned car creating multiple (/showthread.php?tid=533042)



spawned car creating multiple - x4hi - 22.08.2014

I have started to work on my spawn car coords and since i have gotten the car i want in game right on grove street, every time i go in my server or if someone joins, it spawns my one car one after another right on top of each other. Total of maybe 4 stacked up lol Its not pro code or anything, i am just still working on the basics. Is it because there are four floats?

The Code:
http://pastebin.com/uxTHEUDC

http://imgur.com/HoxEAvV


Re: spawned car creating multiple - nmader - 22.08.2014

In your code you have:
pawn Код:
AddStaticVehicle(600,2511.0559,-1671.5609,13.1509,354.3130,43,8);
under OnPlayerRequestClass; it is vehicle related, thus it should be under OnGameModeInit, at least for how you are using it.


Re: spawned car creating multiple - Ox1gEN - 22.08.2014

If you want to spawn a certain vehicle once a player spawns, do:

CreateVehicle - It's bassicly a function that spawns a car instantly without spamming it.