- 0
Ajutor comanda setadminoff
-
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
jAMAiCA.
Am incercat implementarea comenzii asteia in gm bh by hpq123, ii dau admin 1 si nu merge, nu se salveaza, cand intra pe server nu are admin. Daca imi puteti spune ce e gresit.
YCMD:setadminoff(playerid, params[]) {
if(PlayerInfo[playerid][pAdmin] < 6) return SendClientMessage(playerid, -1, AdminOnly);
new id[64], adminlevel, userid, string[200];
if(sscanf(params, "s[64]i", id, adminlevel)) return SendClientMessage(playerid, COLOR_WHITE, "{33CCFF}Sintaxa: {FFFFFF}/setadminoff <Name> <Admin Level>");
new cont = MySQLCheckAccount(id);
userid = GetPlayerID(id);
if(cont == 0) return SCM(playerid, -1, "Eroare: Acest nume nu a fost gasit in baza de date!");
if(adminlevel < 0 || adminlevel > 6) return SCM(playerid, COLOR_GREY, "Invalid admin level! (0-6)");
format(string, sizeof(string), "I-ai setat lui %s admin %d.", id, adminlevel);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "AdmCmd: %s i-a setat lui (Offline)%s admin %d.", GetName(playerid), id, adminlevel);
if(GetPVarInt(playerid, "Cover") == 0) SendAdminMessage(COLOR_LOGS, string, 6);
PlayerInfo[userid][pAdmin] = adminlevel;
new query[180];
if(adminlevel >= 1) format(query, sizeof(query), "UPDATE users SET `Security`='%s', `HelpedPlayers`='0', `Admin`='%s' WHERE `name`='%s'", MD5_Hash(DEFAULT_PASSWORD), adminlevel, userid);
else format(query, sizeof(query), "UPDATE users SET `AW`='0', `Admin`='0' WHERE `name`='%s'", userid);
mysql_query(SQL, query);
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