12.11.2011, 23:31
Hello,
I have a problem with my command, the objets doesn't appear on the vehicle, but they are created at 0, 0, 0, anyone know why? Here the code..
Thanks.
I have a problem with my command, the objets doesn't appear on the vehicle, but they are created at 0, 0, 0, anyone know why? Here the code..
pawn Код:
if(!strcmp(cmdtext, "/sultanadmin", true))
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 1337)
{
new veh, Float:Pos[4];
new currentveh;
currentveh = GetPlayerVehicleID(playerid);
veh = GetVehiclePos(currentveh, Float:Pos[0], Float:Pos[1], Float:Pos[2]);
SetVehicleHealth(currentveh,10000);
VehicleObject[0] = CreateObject(2985, -0.03, 0.25, -0.06, 0.00, 0.00, 90.00);
VehicleObject[1] = CreateObject(2985, -0.09, -0.63, -0.06, 0.00, 0.00, 270.00);
VehicleObject[2] = CreateObject(362, -1.00, 1.72, 0.21, 25.62, 24.00, 90.00);
VehicleObject[3] = CreateObject(362, 1.15, 1.72, 0.21, 25.62, 24.00, 90.00);
VehicleObject[4] = CreateObject(18646, -0.60, 0.12, 0.85, 0.00, 0.00, 0.00);
VehicleObject[5] = CreateObject(18637, -0.80, -2.45, 0.30, 90.00, 0.00, 0.00);
VehicleObject[6] = CreateObject(18637, 0.18, -2.45, 0.30, 90.00, 0.00, 0.00);
VehicleObject[7] = CreateObject(18637, -0.32, -2.45, 0.30, 90.00, 0.00, 0.00);
VehicleObject[8] = CreateObject(18637, 0.56, -2.45, 0.30, 90.00, 0.00, 0.00);
AttachObjectToVehicle(VehicleObject[0], veh, -0.03, 0.25, -0.06, 0.00, 0.00, 90.00);
AttachObjectToVehicle(VehicleObject[1], veh, -0.09, -0.63, -0.06, 0.00, 0.00, 270.00);
AttachObjectToVehicle(VehicleObject[2], veh, -1.00, 1.72, 0.21, 25.62, 24.00, 90.00);
AttachObjectToVehicle(VehicleObject[3], veh, -0.60, 0.12, 0.85, 0.00, 0.00, 0.00);
AttachObjectToVehicle(VehicleObject[4], veh, -0.80, -2.45, 0.30, 90.00, 0.00, 0.00);
AttachObjectToVehicle(VehicleObject[5], veh, 0.18, -2.45, 0.30, 90.00, 0.00, 0.00);
AttachObjectToVehicle(VehicleObject[6], veh, -0.32, -2.45, 0.30, 90.00, 0.00, 0.00);
AttachObjectToVehicle(VehicleObject[7], veh, 0.56, -2.45, 0.30, 90.00, 0.00, 0.00);
AttachObjectToVehicle(VehicleObject[8], veh, 1.15, 1.72, 0.21, 25.62, 24.00, 90.00);
SendClientMessage(playerid, COLOR_GRAD2, "Sultan йquipйe, 10000 PV!");
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "Vous n'avez pas accиs а cette commande!");
}
}
return 1;
}