dcmd_carcolor(playerid,params[]) { if(IsPlayerCommandLevel(playerid,"carcolor")) { new tmp[256],tmp2[256],Index; tmp = strtok(params,Index), tmp2 = strtok(params,Index); if(!strlen(tmp)||!(strval(tmp) >= 0 && strval(tmp) <= 126)||!IsNumeric(tmp)||!IsNumeric(tmp2)) return SendClientMessage(playerid,red,"Syntax Error: \"/CARCOLOR <COLOR 1> (<COLOR 2>)\"."); if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,red,"ERROR: You must be in a vehicle."); SendCommandMessageToAdmins(playerid,"CARCOLOR"); if(!strlen(tmp2)) tmp2 = tmp; new string[256],name[24]; GetPlayerName(playerid,name,24); format(string,256,"You have set your color data to: [Color 1: %d || Color 2: %d]",strval(tmp),strval(tmp2)); return ChangeVehicleColor(GetPlayerVehicleID(playerid),strval(tmp),strval(tmp2)); } else return SendLevelErrorMessage(playerid,"carcolor"); }
CMD:destroycar(playerid, params[]) { if(!CheckAdmin(playerid, ADMIN_LEVEL_1)) return NotAuthMSG(playerid); if(!PlayerInCar(playerid)) return NotInCarMSG(playerid); format(msg, sizeof(msg), "You've destroyed vehicle ID: %d.", GetPlayerVehicleID(playerid)); SCM(playerid, COLOR_GRAD4, msg); DestoryCar(GetPlayerVehicleID(playerid)); return 1; } |
if(strcmp(cmd, "/destroycar", true)== 0) { if(PlayerInfo[playerid][pAdmin] >= 4) { if(!vehenabled) return SendClientMessage(playerid, GREY, "/veh was disabled by executive staff."); new currentVehicle = GetPlayerVehicleID(playerid); if(currentVehicle == 0) return SendClientMessage(playerid,GREY, " You must be in a vehicle to destroy it."); new check; for(new i = 0; i < sizeof(CreatedCars); i++) { if(CreatedCars[i] == currentVehicle) { check = 1; CreatedCars[i] = INVALID_VEHICLE_ID; break; } } if(!check) return SendClientMessage(playerid, GREY, " You may only destroy a vehicle that was created with /veh."); gDestroyVehicle[currentVehicle] = 1; RemoveSiren(currentVehicle); SetVehicleToRespawn(currentVehicle); return 1; } else { SendClientMessage(playerid, GREY, " You are not authorized to use that command."); } } |
CMD:destroycars(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] < 4) { SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command!"); return 1; } for(new i = 0; i < sizeof(CreatedCars); i++) { if(CreatedCars[i] != INVALID_VEHICLE_ID) { DestroyVehicle(CreatedCars[i]); CreatedCars[i] = INVALID_VEHICLE_ID; } } SendClientMessageEx(playerid, COLOR_GREY, " Created vehicles destroyed!"); return 1; } |
CMD:destroyveh(playerid, params[]) { new veh; veh = GetPlayerVehicleID(playerid); DestroyVehicle(veh); return 1; }
dcmd_cardestroy(playerid,params[]) {
if(IsPlayerCommandLevel(playerid,"cardestroy")) { // I named it cardestroy...
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,red,"ERROR: You must be in a vehicle.");
SendCommandMessageToAdmins(playerid,"CARDESTROY");
new string[256],name[24]; GetPlayerName(playerid,name,24);
format(string,256,"You have destroyed your vehicle");
SendClientMessage(playerid, red, string);
return DestroyVehicle(GetPlayerVehicleID(playerid));
} else return SendLevelErrorMessage(playerid,"carcolor");
}
dcmd_cardestroy(playerid,params[]) {
#pragma unused params
if(IsPlayerCommandLevel(playerid,"cardestroy")) { // I named it cardestroy...
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,red,"ERROR: You must be in a vehicle.");
SendCommandMessageToAdmins(playerid,"CARDESTROY");
new string[256],name[24]; GetPlayerName(playerid,name,24);
format(string,256,"You have destroyed your vehicle");
SendClientMessage(playerid, red, string);
return DestroyVehicle(GetPlayerVehicleID(playerid));
} else return SendLevelErrorMessage(playerid,"carcolor");
}