Is this possible
#1

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

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)
Reply
#3

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

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

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

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)