17.11.2014, 09:04
OK, so I'm trying to make a mod saving system for my server, and so far the entire system is up and works perfectly, but for one simple problem.
The side skirts components (for testing I am using 1017 (left side) and 1007 (right side), which are the standard transfender side skirts and work on most cars) will save using my system, but when I try to load all the car mods to a vehicle, all the mods load fine except for the side skirts, which will not show, despite being added to the vehicle by my script. In short, I am calling the AddVehicleComponent function, but certain components will not add themselves.
Here is the section my code responsible, note that it will print "left side skirt 1017" and something similar for the right, showing that my mod saving system is working. Also note that this code work fine for any other car mods, all it won't do is load the side skirt mods to a vehicle.
I don't know if this is a bug in samp, or if there is something I don't know, or if there may be a way around this. I am just asking in the hope that someone who has made this work for them will be able go guide me as to how to do it myself.
Thanks in advance for any help.
The side skirts components (for testing I am using 1017 (left side) and 1007 (right side), which are the standard transfender side skirts and work on most cars) will save using my system, but when I try to load all the car mods to a vehicle, all the mods load fine except for the side skirts, which will not show, despite being added to the vehicle by my script. In short, I am calling the AddVehicleComponent function, but certain components will not add themselves.
Here is the section my code responsible, note that it will print "left side skirt 1017" and something similar for the right, showing that my mod saving system is working. Also note that this code work fine for any other car mods, all it won't do is load the side skirt mods to a vehicle.
pawn Код:
if(vehicleStat[vehstatid][vMod03] != 0) {
AddVehicleComponent(vehicleid, vehicleStat[vehstatid][vMod03]);
componentsAdded++;
printf("left side skirt %d", vehicleStat[vehstatid][vMod03]);
}
if(vehicleStat[vehstatid][vMod04] != 0) {
AddVehicleComponent(vehicleid, vehicleStat[vehstatid][vMod04]);
componentsAdded++;
printf("right side skirt %d", vehicleStat[vehstatid][vMod04]);
}
Thanks in advance for any help.