Posts: 600
Threads: 99
Joined: Apr 2008
Reputation:
0
I currently have my vehicles loading from a database which is loaded Ongamemodeinit, sa-mp server outputs Number of vehicle models 0
Possible to make the vehicles loaded from the database to show up on the number of vehicle models and on /dl the preloaded to 1?
Currently it dosen't show the amount of vehicle models and the cars preloaded is 0
Or can this only be done via adding them to the script?
Posts: 97
Threads: 25
Joined: Oct 2012
Reputation:
0
As far as I know it - simplified - counts the "AddStaticVehicle" - natives in your Script.
"CreateVehicle" won't be counted. It will stay at 0, unless you add a fixed car to your script. ( AddStaticVehicle/Ex)
Posts: 600
Threads: 99
Joined: Apr 2008
Reputation:
0
That makes sense, ya i was using AddstaticVehicle at first then cars kept respawning so i switched to CreatVehicle with -1 respawn time, i forgot about the AddStaticVehicleEx.
Thank you for you're help.
Edit:
Using AddStaticVehicleEx doesen't add to the vehicle models.
Posts: 97
Threads: 25
Joined: Oct 2012
Reputation:
0
I just found out that it doens't "count" the natives. It counts the models.
So if you add 2 Cheetah and 1 Infernus the output will be ".. of vehicle models: 2". ( Two models: Cheetah & Infernus. )
Posts: 10,066
Threads: 38
Joined: Sep 2007
Reputation:
0
Only models that are created within OnGameModeInit directly count towards that number. Most likely you're loading stuff via threads. Since these callbacks get executed after OnGameModeInit has already finished, those vehicles won't count to that number.
Posts: 600
Threads: 99
Joined: Apr 2008
Reputation:
0
Well i got a function, that function is then called via OnGameModeInit after the mysql has connected.
Function leads to my queries, the mysql_function queries, which loads the vehicles.
I was just curious cause i noticed all the cars added via the mysql, the "preloaded" was 0