26.07.2013, 01:21
Hello I was wondering how to do a command that would remove all vehicles that are spawned with this command:
Code:
CMD:veh(playerid, params[]) { new vehid,vehicle,engine,lights,alarm,doors,bonnet,boot,objective; if(PlayerInfo[playerid][pLevel] < 1) return error if(sscanf(params, "i", vehid)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /veh <carid>"); else if (vehid < 400 || vehid > 611) SendClientMessage(playerid, COLOR_GREY, "[ERROR] Invalid car id! [ Car ID's range from 400 - 611 ]"); else { new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); vehicle = CreateVehicle(vehid, x + 3, y, z, 0, 0,0, -1); GetVehicleParamsEx(vehid,engine,lights,alarm,doors,bonnet,boot,objective); SetVehicleParamsEx(vehid,1,lights,alarm,doors,bonnet,boot,objective); ChangeVehicleColor(vehicle, 219, 251); SetVehicleNumberPlate(vehicle,"{FF8000}BHaulers"); PutPlayerInVehicle(playerid,vehicle,0); SendClientMessage(playerid, COLOR_GREEN, "Car spawned!"); } return 1; }