26.07.2013, 03:14
I'm confused now. Could you edit this for me?
Code:
new vehToDelete[MAX_VEHICLES]; 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, Float:angle; GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid,angle); vehToDelete[vehicle] = CreateVehicle(vehid, x + 3, y, z, angle, 219,251, -1); GetVehicleParamsEx(vehid,engine,lights,alarm,doors,bonnet,boot,objective); SetVehicleParamsEx(vehid,1,lights,alarm,doors,bonnet,boot,objective); SetVehicleNumberPlate(vehToDelete[vehicle],"{FF8000}BHaulers"); VehicleFuel[vehid] = 100+random(50); PutPlayerInVehicle(playerid,vehToDelete[vehicle],0); SendClientMessage(playerid, COLOR_GREEN, "Car spawned!"); } return 1; } CMD:cleancars(playerid, params[]) { for(new i = 0; i < MAX_VEHICLES; i++) { if(vehToDelete[i] != -1) DestroyVehicle(i); } return 1; }