if (strcmp("/aveh", cmdtext, true, 10) == 0)
{
new Obj1 = CreateObject(1000, 1857.13, 810.50, 10.45, 7.44, -0.84, -1.20);
new Obj2 = CreateObject(1006, 1857.08, 814.52, 10.43, 0.00, 0.00, 0.00);
new Obj3 = CreateObject(1025, 1856.40, 811.98, 10.42, 0.00, 0.00, 1.44);
new Obj4 = CreateObject(1046, 1857.29, 812.24, 10.08, 0.00, 0.00, 0.00);
new Obj5 = CreateObject(2937, 1857.02, 815.27, 9.52, 0.96, 88.32, -90.12);
new Veh = GetPlayerVehicleID(playerid);
AttachObjectToVehicle(Obj1, Veh, 1857.13, 810.50, 10.45, 7.44, -0.84, -1.20);
AttachObjectToVehicle(Obj2, Veh, 1857.08, 814.52, 10.43, 0.00, 0.00, 0.00);
AttachObjectToVehicle(Obj3, Veh, 1856.40, 811.98, 10.42, 0.00, 0.00, 1.44);
AttachObjectToVehicle(Obj4, Veh, 1857.29, 812.24, 10.08, 0.00, 0.00, 0.00);
AttachObjectToVehicle(Obj5, Veh, 1857.02, 815.27, 9.52, 0.96, 88.32, -90.12);
return 1;
}
return 0;
}
Aveh = CreateVehicle(605, 1857.1119, 812.9612, 10.0264, 1.2000, -1, -1, 100);// Admin vehicle
AttachObjectToVehicle(Obj1, Veh, 0, 0, 0, 7.44, -0.84, -1.20); //change the first 3 coords to 0 and keep the rotation because u didn't set the object position @u set the object to be >1857.13, 810.50, 10.45 away from the vehicle note:change each one
https://sampwiki.blast.hk/wiki/AttachObjectToVehicle
as u see u set the object distance to be far awah from the vehicle try: pawn Код:
|
new Float:y[3];
GetPlayerPos(playerid ,y[0], y[1], y[2]);
new x =CreateVehicle(541,y[0], y[1], y[2],90, 93, 93, -1);
PutPlayerInVehicle(playerid, x , 0);
new Obj1 = CreateObject(1000, 0,0,0, 7.44, -0.84, -1.20);
new Obj2 = CreateObject(1006, 0,0,0, 0.00, 0.00, 0.00);
new Obj3 = CreateObject(1025, 0,0,0, 0.00, 0.00, 1.44);
new Obj4 = CreateObject(1046, 0,0,0, 0.00, 0.00, 0.00);
new Obj5 = CreateObject(2937, 0,0,0, 0.96, 88.32, -90.12);
new Veh = GetPlayerVehicleID(playerid);
AttachObjectToVehicle(Obj1, Veh, 0,0,1, 7.44, -0.84, -1.20);
AttachObjectToVehicle(Obj2, Veh, 0,0,1, 0.00, 0.00, 0.00);
AttachObjectToVehicle(Obj3, Veh, 0,0,1, 0.00, 0.00, 1.44);
AttachObjectToVehicle(Obj4, Veh, 0,0,1, 0.00, 0.00, 0.00);
AttachObjectToVehicle(Obj5, Veh, 0,0,1, 0.96, 88.32, -90.12);