- 0
problema /setadmin
-
Similar Content
-
Recently Browsing 0 members
- No registered users viewing this page.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.
Question
zonga
salutare am si eu o problema la comanda /setadmin eu mi-am setat admin 8 di baza de date si cand intru pe server si vreau sa dau admin la cineva imi spune ca nu am acces la accea comanda eu avand admin 8 dece ?
CMD:setadmin(playerid, params[]) {
if(!EstiFondator(playerid)) return SCM(playerid, COLOR_ERROR, AdminOnly);
new userID, admin;
if(sscanf(params, "ud", userID, admin)) return SCM(playerid, COLOR_SYNTAX, "Syntax: {FFFFFF}/setadmin <Name/ID> <Admin Level>");
if(admin < 0 || admin > 8) return SCM(playerid, COLOR_ERROR, "Error: Admin level invalid (0 - 8).");
if(!Connected(userID)) return SCM(playerid, COLOR_ERROR, "Error: This player it's not connected.");
if(PlayerInfo[userID][pAdmin] == 0 && admin > 0) Iter_Add(ServerAdmins, userID);
if(PlayerInfo[userID][pAdmin] > 0 && admin == 0) Iter_Remove(ServerAdmins, userID);
new string[180];
PlayerInfo[userID][pAdmin] = admin;
SCM(playerid, COLOR_YELLOW, "You have promoted %s to a level %d admin.", GetName(userID), admin);
SCM(userID, COLOR_YELLOW, "You've been promoted to level %d admin, by %s %s.", admin, GetAdminName(playerid), GetName(playerid));
format(string, sizeof(string), "AdmCmd: %s %s set %s's admin level to %d.", GetAdminName(playerid), GetName(playerid), GetName(userID), admin);
SendAdminMessage(COLOR_LIGHTRED, string, 1);
print(string);
if(admin == 0) AdminDuty[userID] = 0;
UpdateInt(userID, "Admin", PlayerInfo[userID][pAdmin]);
return 1;
1 answer to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now