Sideskirt not attached to Slamvam
#1

Hello all!
Well, I have a system to attach components to the player's modded vehicles, reading the IDs from one file, like:
pawn Код:
if(dini_Int(pVeh, "Lights") != -1)
{
AddVehicleComponent(bought_vehicle[playerid], dini_Int(pVeh, "Lights"));
}
Well, all work right, except the Sideskirts. They won't attach to vehicle.
pawn Код:
if(dini_Int(pVeh, "Sideskirt") != -1)
{
AddVehicleComponent(bought_vehicle[playerid], dini_Int(pVeh, "Sideskirt"));
}
Why? Can anyone help me to solve this? Why all components are added, but Sideskirts no?
Thanks all in advance and I apreciate all help!
Reply
#2

well, I expirienced sideskirts problem with every tunable car, they usually dont show for 1st time, but after adding them again, they show up.
Reply
#3

Yep, I've fixed it with a timer.
I will let the code here if someone needs. Load the variable line in dini file and put in a timer public:
pawn Код:
if(GetVehicleComponentType(Sideskirt) != Sideskirt)
            {
                AddVehicleComponent(bought_vehicle[playerid], Sideskirt);
            }
        }
The GetVehicleComponentType is only for check if the car already have a Sideskirt and not add if it have.
See ya!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)