Hi guys. I have here a vkill command which deletes the vehicle. But I also want to add to this command a attach vehicle object delete. Coz I tried to delete a vehicle with an objects attached on it but it doesn't, the objects just floats and only stay in current position, but the vehicle deletes.
Код:
CMD:vkill(playerid, params[])
{
if(pInfo[playerid][pLevel] >= 1)
{
new vehicleid, string[64];
if(vehicleid == INVALID_VEHICLE_ID) return SendClientMessage(playerid, white,"{FF0000}>> Vehicle not found");
if(!sscanf(params, "i", vehicleid))
{
DestroyVehicle(vehicleid);
format(string, sizeof(string), ">> Vehicle ID: %d has been successfully deleted", vehicleid);
SendClientMessage(playerid, white, string);
return 1;
}
else return SendClientMessage(playerid, white, "{FFFF00}Usage: /vkill <Vehicle ID>");
}
else return ShowMessage(playerid, red, 1);
}