SA-MP Forums Archive
Confusion of AddStaticVehicle - 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: Confusion of AddStaticVehicle (/showthread.php?tid=145844)



Confusion of AddStaticVehicle - ||123|| - 04.05.2010

Over here https://sampwiki.blast.hk/wiki/AddStaticVehicle it says that you can't put AddStaticVehicle function anywhere else except from OnGameModeInIt, but i used it in OnPlayerCommand and it works, why is that? or is there any problem in doing that?


Re: Confusion of AddStaticVehicle - ||123|| - 04.05.2010

I need to know this fast please.


Re: Confusion of AddStaticVehicle - Dolph - 04.05.2010

Quote:

You can use this function to add vehicles to your gamemode. This function can only create vehicles in the OnGameModeInit callback. Check CreateVehicle if you are interested in creating vehicles during game-runtime.

You won't get any errors, but the vehicles won't be spawned.


Re: Confusion of AddStaticVehicle - Noredine - 04.05.2010

Yes you can but i think ( me don't sure )
The vehicle is saved.
When you restart the server see if vehicle saved in position , if not
Not worry and don't confuse
Best use:
GetPlayerPosition
CreateVehicle(...


Re: Confusion of AddStaticVehicle - Torran - 04.05.2010

You will compile without errors, But it wont spawn a car ingame,
Use CreateVehicle for that


Re: Confusion of AddStaticVehicle - ||123|| - 04.05.2010

It is spawning