Confusion of AddStaticVehicle
#1

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

I need to know this fast please.
Reply
#3

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.
Reply
#4

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(...
Reply
#5

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

It is spawning
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)