07.10.2014, 15:14
The red is the error
Wrong
Right
Wrong
Код:
CMD:vehdestroy(playerid, params[]) { if(pInfo[playerid][pAdminLevel] <= 4) return SendClientMessage(playerid, COLOR_GREY, "You are not authorised to use that command."); if(GetPVarInt(playerid, "AdminDuty") == 0 && pInfo[playerid][pAdminLevel] < 8) return SendClientMessage(playerid, COLOR_GREY, "You need to be on admin duty to use that command."); for(new i = 0; i < sizeof(AdminCars2); i++) { if(AdminCars2[i] > 0) { DestroyVehicle(AdminCars2[i]); AdminCars2[i] -= 1; } } for(new i = 0; i < sizeof(AdminCars); i++) { if(AdminCars[i] > 0) { DestroyVehicle(AdminCars2[i]); AdminCars[i] -= 1; } } carid2 = 0; SendClientMessage(playerid, COLOR_GREY, "All admin cars have been removed."); return 1; }
Код:
CMD:vehdestroy(playerid, params[]) { if(pInfo[playerid][pAdminLevel] <= 4) return SendClientMessage(playerid, COLOR_GREY, "You are not authorised to use that command."); if(GetPVarInt(playerid, "AdminDuty") == 0 && pInfo[playerid][pAdminLevel] < 8) return SendClientMessage(playerid, COLOR_GREY, "You need to be on admin duty to use that command."); for(new i = 0; i < sizeof(AdminCars2); i++) { if(AdminCars2[i] > 0) { DestroyVehicle(AdminCars2[i]); AdminCars2[i] -= 1; } } for(new i = 0; i < sizeof(AdminCars); i++) { if(AdminCars[i] > 0) { DestroyVehicle(AdminCars[i]); AdminCars[i] -= 1; } } carid2 = 0; SendClientMessage(playerid, COLOR_GREY, "All admin cars have been removed."); return 1; }