18.08.2015, 01:08
sup guy I got a problem
with those codes
I want only for id 550 (sunrise) to attach those objects & add components
I don't get any error in server but when I connect and type admin cmd /car sunrise the object don't attach to the Vehicle
can anyone help me ?
with those codes
I want only for id 550 (sunrise) to attach those objects & add components
pawn Код:
public OnGameModeInit()
{
AddVehicleComponent(550, 1001);
AddVehicleComponent(550, 1005);
AddVehicleComponent(550, 1006);
AddVehicleComponent(550, 1010);
AddVehicleComponent(550, 1020);
AddVehicleComponent(550, 1025);
AddVehicleComponent(550, 1143);
tmpobjid = CreateDynamicObject(1593,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
SetDynamicObjectMaterial(tmpobjid, 0, 1560, "7_11_door", "CJ_CHROME2", -16738048);
AttachDynamicObjectToVehicle(tmpobjid, 550, 0.000, 3.000, -0.400, 0.000, 90.000, 90.000);
tmpobjid = CreateDynamicObject(1593,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
SetDynamicObjectMaterial(tmpobjid, 0, 1560, "7_11_door", "CJ_CHROME2", -16738048);
AttachDynamicObjectToVehicle(tmpobjid, 550, 0.000, 3.000, -0.200, 0.000, 90.000, 90.000);
return 1;
}
public OnVehicleSpawn(vehicleid)
{
if(vehicleid == GetVehicleModel(vehicleid ==550))
{
AddVehicleComponent(550, 1001);
AddVehicleComponent(550, 1005);
AddVehicleComponent(550, 1006);
AddVehicleComponent(550, 1010);
AddVehicleComponent(550, 1020);
AddVehicleComponent(550, 1025);
AddVehicleComponent(550, 1143);
tmpobjid = CreateDynamicObject(1593,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
SetDynamicObjectMaterial(tmpobjid, 0, 1560, "7_11_door", "CJ_CHROME2", -16738048);
AttachDynamicObjectToVehicle(tmpobjid, 550, 0.000, 3.000, -0.400, 0.000, 90.000, 90.000);
tmpobjid = CreateDynamicObject(1593,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
SetDynamicObjectMaterial(tmpobjid, 0, 1560, "7_11_door", "CJ_CHROME2", -16738048);
AttachDynamicObjectToVehicle(tmpobjid, 550, 0.000, 3.000, -0.200, 0.000, 90.000, 90.000);
}
return 1;
}
can anyone help me ?