19.09.2017, 17:19
Amazing job +rep
The admin code dont work:
I found this in the gamemode aijfaisjfaisfaisfafnskanf123123 |
COMMAND:makeadmin(playerid, params[]) { if(PlayerStat[playerid][AdminLevel] < 5) return SendClientMessage(playerid, WHITE, "SERVER: Unknown command."); new targetid, alevel, str[128], olevel = PlayerStat[targetid][AdminLevel]; if(sscanf(params,"ud", targetid, alevel))return SendClientMessage(playerid, GREY, "USAGE: /makeadmin [playerid] [adminlevel]"); if(targetid == INVALID_PLAYER_ID) return SendClientMessage(playerid, GREY, "Target ID not found."); if(alevel < 0 || alevel > 5) return SendClientMessage(playerid, GREY, "Invalid admin level."); if(alevel > olevel) { format(str, sizeof(str), "Admin %s has promoted %s to level %d admin.", GetForumNameNC(playerid), GetForumNameNC(targetid), alevel); SendClientMessageToAll(RED, str); AdminActionLog(str); PlayerStat[targetid][AdminLevel] = alevel; if (!olevel) { format(PlayerStat[targetid][AdminCode], 128, "A%d%d", random(100) + 10, random(100) + 10); format(str, sizeof str, "Your administrator code is: \"%s\". Please write it down somewhere!", PlayerStat[targetid][AdminCode]); SendClientMessage(targetid, RED, str); } } else { format(str, sizeof(str), "Admin %s has demoted %s to level %d admin.", GetForumNameNC(playerid), GetForumNameNC(targetid), alevel); SendClientMessageToAll(RED, str); AdminActionLog(str); PlayerStat[targetid][AdminLevel] = alevel; } return 1; }