01.02.2015, 13:25
I have created this command but i want it so i can also destroy the attached object within the same command any idea how would i do this?
Код:
CMD:pd1(playerid, params[])
{
if (GetFactionType(playerid) != FACTION_POLICE)
return SendErrorMessage(playerid, "You are not a police officer.");
new vehicleid = GetPlayerVehicleID(playerid);
if (!IsPlayerInAnyVehicle(playerid))
return SendErrorMessage(playerid, "You must be inside a vehicle.");
new g_Object[2];
new g_Vehicle[1];
g_Object[0] = CreateObject(19419, 1252.6768, -1320.4995, 13.6476, 0.0000, 0.0000, 0.0000); //police_lights01
g_Object[1] = CreateObject(19419, 1059.0290, -1580.8629, 10.8403, 0.0000, 0.0000, 0.0000); //police_lights01
//g_Vehicle[0] = CreateVehicle(596, 1060.4080, -1576.1466, 13.0340, 84.4289, 0, 1, -1); //Police Car (LSPD)
AttachObjectToVehicle(g_Object[0], g_Vehicle[0], 0.0000, 2.4000, 0.0000, 0.0000, 0.0000, 0.0000);
AttachObjectToVehicle(g_Object[1], g_Vehicle[0], 0.0000, -2.0000, 0.0000, 0.0000, 0.0000, 0.0000);
return 1;
}


