Help with making a vehicle system
#1

Hey guys, how are ya'?
I'm trying to make a vehicle system for my GM, but I have some troubles.
I'm mapping the GM with MTA of course, and after that I'm converting it using convertffs.com.
As you may know, it also converts vehicles and outputs them as "AddStaticVehicleEx".
Now, I want to make a public called "LoadVehicles", which loads all the vehicles, and then inserts them into the Database if they don't exists (I know how to do the MySQL part). Problem is, I've tried to make something like that as a scratch:
pawn Код:
public LoadVehicles() {
    for (new i; i < MAX_VEHICLES; i++) {
        if (GetVehicleModel(i)) {
            SetVehicleToRespawn(i);
            printf("vehicle %d loaded.",i);
        }
    }
    return 1;
}
But it just doesn't load the vehicles (I've used "GetVehicleModel" to know if this vehicle exists, I don't want it to load me vehicles that don't exists). But it just don't load my anything. If I remove the "GetVehicleModel", it loads me vehicles - But even vehicles that don't exist.
What should I do? How should I load the vehicles?

Thanks !
Reply
#2

pawn Код:
if(GetVehicleModel(i) >= 400)
Reply
#3

Why did you make second same topic like here ? https://sampforum.blast.hk/showthread.php?tid=341849 what you wonna do wich this get bann ?
Reply
#4

Nope, still not working. It just doesn't output anything.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)