21.04.2015, 16:45
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:
add vehicle components stock:
if anyone could help with this i would really appreciate 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);
Код:
stock AddVehicleComponents(vehicleid, {Float,_}:...) { for(new i; i < numargs(); i++) { AddVehicleComponent(vehicleid, getarg(i)); } return INVALID_COMPONENT_ID; }