[AJUDA]AddVehicleComponent - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [AJUDA]AddVehicleComponent (
/showthread.php?tid=325727)
[AJUDA]AddVehicleComponent -
GraziFerreira - 14.03.2012
Hello, I'm having a problem a few days will, I am trying to add the components in vehicles only for variables that I'm not getting.
I've done a debug command to verify the values and the values are correct over the components are not added when I put the following manner:
pawn Code:
stock SetVehicleModifications(vehicleid)
{
AddVehicleComponent(vehicleid, CarInfo[vehicleid][Component0]);
AddVehicleComponent(vehicleid, CarInfo[vehicleid][Component1]);
AddVehicleComponent(vehicleid, CarInfo[vehicleid][Component2]);
AddVehicleComponent(vehicleid, CarInfo[vehicleid][Component3]);
AddVehicleComponent(vehicleid, CarInfo[vehicleid][Component4]);
CarInfo[vehicleid][Component5] = 1010;
AddVehicleComponent(vehicleid, CarInfo[vehicleid][Component5]);
AddVehicleComponent(vehicleid, CarInfo[vehicleid][Component6]);
AddVehicleComponent(vehicleid, CarInfo[vehicleid][Component7]);
AddVehicleComponent(vehicleid, CarInfo[vehicleid][Component8]);
AddVehicleComponent(vehicleid, CarInfo[vehicleid][Component9]);
AddVehicleComponent(vehicleid, CarInfo[vehicleid][Component10]);
AddVehicleComponent(vehicleid, CarInfo[vehicleid][Component11]);
AddVehicleComponent(vehicleid, CarInfo[vehicleid][Component12]);
AddVehicleComponent(vehicleid, CarInfo[vehicleid][Component13]);
printf("Variavel Component 5 Valor: %d",CarInfo[vehicleid][Component5]);
return 1;
}
Al Component5 only is added.
The Print with the value taken is the same with or without it:
[pawn] CarInfo [vehicleid] [Component5] = 1010; [/ pawn]
Someone help me?
Sorry my english bad.