Vehicle side skirts problem - 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: Vehicle side skirts problem (
/showthread.php?tid=571718)
Vehicle side skirts problem -
tomosaurus - 21.04.2015
Hello, i have got a problem with my vehicle script. Everything is working fine except when i call my car for the first time side skirts are not added to it..
Code:
Код:
new spoiler, hood, roof, side_skirt, lamps, nitro, exhaust, wheels, stereo, hydraulics, f_bumper, r_bumper, hod_vents, hood_vents;
spoiler = dini_Int(dini, "comp_0");
hood = dini_Int(dini, "comp_1");
roof = dini_Int(dini, "comp_2");
side_skirt = dini_Int(dini, "comp_3");
lamps = dini_Int(dini, "comp_4");
nitro = dini_Int(dini, "comp_5");
exhaust = dini_Int(dini, "comp_6");
wheels = dini_Int(dini, "comp_7");
stereo = dini_Int(dini, "comp_8");
hydraulics = dini_Int(dini, "comp_9");
f_bumper = dini_Int(dini, "comp_10");
r_bumper = dini_Int(dini, "comp_11");
hod_vents = dini_Int(dini, "comp_12");
hood_vents = dini_Int(dini, "comp_13");
PlayerVehicle[0][playerid][vehicle] = CreateVehicle(pname(playerid), PlayerVehicle[0][playerid][modelid], PlayerVehicle[0][playerid][Spawn_X], PlayerVehicle[0][playerid][Spawn_Y], PlayerVehicle[0][playerid][Spawn_Z], PlayerVehicle[0][playerid][Spawn_R], PlayerVehicle[0][playerid][color_1], PlayerVehicle[0][playerid][color_2], 0);
AddVehicleComponents(PlayerVehicle[0][playerid][vehicle], spoiler, hood, roof, side_skirt, lamps, nitro, exhaust, wheels, stereo, hydraulics, f_bumper, r_bumper, hod_vents, hood_vents);
add vehicle components stock:
Код:
stock AddVehicleComponents(vehicleid, {Float,_}:...)
{
for(new i; i < numargs(); i++)
{
AddVehicleComponent(vehicleid, getarg(i));
}
return INVALID_COMPONENT_ID;
}
if anyone could help with this i would really appreciate it
Re: Vehicle side skirts problem -
Azula - 21.04.2015
PlayerVehicle[0][playerid][vehicle]
what [0] refer to ?
and what this
CreateVehicle(pname(playerid),
![Huh?](images/smilies/confused.gif)
id from Name or what ?
Re: Vehicle side skirts problem -
tomosaurus - 21.04.2015
in the script you buy cars so the [0] refers to cars slot but that's not the part not working and the pname i used for custom stock and i forgot to remove it... i managed to fix it somehow so i don't need help anymore thanks.