carmod = warning
#1

Is there anything i need to know when loading vehicle tuning from mysql?

pawn Код:
ChangeVehiclePaintjob(vCarID, mod[14]); // changes the paintjob of the player's current vehicle

            AddVehicleComponent(vCarID, mod[0]);
            AddVehicleComponent(vCarID, mod[1]);
            AddVehicleComponent(vCarID, mod[2]);
            AddVehicleComponent(vCarID, mod[3]);
            AddVehicleComponent(vCarID, mod[4]);
            AddVehicleComponent(vCarID, mod[5]);
            AddVehicleComponent(vCarID, mod[6]);
            AddVehicleComponent(vCarID, mod[7]);
            AddVehicleComponent(vCarID, mod[8]);
            AddVehicleComponent(vCarID, mod[9]);
            AddVehicleComponent(vCarID, mod[10]);
            AddVehicleComponent(vCarID, mod[11]);
            AddVehicleComponent(vCarID, mod[12]);
            AddVehicleComponent(vCarID, mod[13]);
Tuning loads fine, but players near the tuned vehicles gets warnings and after a while crashes too!
Reply
#2

I think you are adding an invalid component to the vehicle... Try this code:

pawn Код:
for(new i; i < 14; i++)
{
    if(mod[i] >= 1000 && mod[i] <= 1193) //Checks if it's a valid componentid
    {
        AddVehicleComponent(vCarID, mod[i]); //Adds the component
    }
}
Reply
#3

still gets warnings near elegy, sultan..
Reply
#4

Do you have the ELM mod? If so, make it accept it.
Reply
#5

I don't have any mods
Reply
#6

Any other suggestions?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)