Vehicle side skirts problem
#1

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
Reply
#2

PlayerVehicle[0][playerid][vehicle]
what [0] refer to ?

and what this
CreateVehicle(pname(playerid), id from Name or what ?
Reply
#3

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)