- 0
sistem de setadmin eroare
-
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
Emilian
RPG SERVER\gamemodes\emi.pwn(526) : error 029: invalid expression, assumed zero
RPG SERVER\gamemodes\emi.pwn(526) : warning 217: loose indentation
RPG SERVER\gamemodes\emi.pwn(526) : warning 215: expression has no effect
RPG SERVER\gamemodes\emi.pwn(526) : error 001: expected token: ";", but found ")"
RPG SERVER\gamemodes\emi.pwn(526) : error 029: invalid expression, assumed zero
RPG SERVER\gamemodes\emi.pwn(526) : fatal error 107: too many error messages on one line
Linie :
YCMD:setadmin(playerid, params[], help)
{
if(PlayerInfo[playerid][pAdmin] < 7)
return SCM(playerid, COLOR_EROARE, "* Eroare: Nu esti autorizat sa folosesti aceasta comanda.");
new userID, level;
if(sscanf(params, "ud", userID, level))
return SCM(playerid, COLOR_SERVER, "Syntax: {AFAFAF}/setadmin <ID/Nume> <Admin level>");
if(!IsPlayerLogged(userID))
return SCM(playerid, COLOR_EROARE, "* Eroare: Acest jucator nu este conectat.");
if(level < 0 || level > 7)
return SCM(playerid, COLOR_EROARE, "* Eroare: Acest nivel de admin este invalid (0-7).");
if(PlayerInfo[userID][pAdmin] == level)
return SCM(playerid, COLOR_EROARE, "* Eroare: Acest jucator are deja acest nivel de admin.");
if(level == 0)
{
if(Iter_Contains(ServerAdmins, userID))
Iter_Remove(ServerAdmins, userID);
}
else
{
if(!Iter_Contains(ServerAdmins, userID))
Iter_Add(ServerAdmins, userID);
}
PlayerInfo[userID][pAdmin] = level;
mysqlQuery("UPDATE `server_accounts` SET `Admin` = '%d' WHERE `ID` = '%d'", PlayerInfo[userID][pAdmin], PlayerInfo[userID][pSQLID]);
SCM(playerid, COLOR_LIME, "Admin %s ti-a setat admin level %d.", GetPlayerNameEx(playerid), level);
Edited by EmilianSendStaff(COLOR_LIME, "AdmCmd: {AFAFAF}Admin %s i-a setat admin %d lui %s.", GetPlayerName(playerid), level, GetPlayerNameEx(userID));
return true;
}
Detalii:
asa face mereu cand fac asa:
if(PlayerInfo[playerid][pAdmin])
return SCM(playerid, COLOR_EROARE, "Mesaj");
ma chinui de ieri sa rezolv, va rog ajutati-ma.
5 answers 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