04.09.2015, 22:06
Not going to give you the admin even if I logged with rcon say all are not authorized ...
http://pastebin.com/HvHMqZwJ
http://pastebin.com/HvHMqZwJ
if (PlayerData[playerid][pAdmin] < 6) 8. return SendErrorMessage(playerid, "Nu ai permisiunea pentru a folosi aceasta comanda.");
CMD:setadmin(playerid, params[])
{
static
userid,
level;
if(!IsPlayerAdmin(playerid))
return SendErrorMessage(playerid, "Nu ai permisiunea pentru a folosi aceasta comanda.");
if (sscanf(params, "ud", userid, level))
return SendSyntaxMessage(playerid, "/setadmin [playerid/name] [level]");
if (userid == INVALID_PLAYER_ID)
return SendErrorMessage(playerid, "Ai specificat un player invalid!");
if (level < 0 || level > 6)
return SendErrorMessage(playerid, "Invalid admin level. Levels range from 0 to 6.");
if (level > PlayerData[userid][pAdmin])
{
SendAdminAction(playerid, "L-ai promovat pe %s la Admin Level (%d).", ReturnName(userid, 0), level);
SendAdminAction(userid, "%s te-a promovat la Admin Level (%d).", ReturnName(playerid, 0), level);
}
else
{
SendAdminAction(playerid, "L-ai demis pe %s la Admin Level (%d).", ReturnName(userid, 0), level);
SendAdminAction(userid, "%s te-a demis la Admin Level (%d).", ReturnName(playerid, 0), level);
}
PlayerData[userid][pAdmin] = level;
Log_Write("logs/admin_log.txt", "[%s] %s has set %s's admin level to %d.", ReturnDate(), ReturnName(playerid, 0), ReturnName(userid, 0), level);
return 1;
}
if (PlayerData[playerid][pAdmin] < 6)
return SendErrorMessage(playerid, "Nu ai permisiunea pentru a folosi aceasta comanda.");
if(!IsPlayerAdmin(playerid))
return SendErrorMessage(playerid, "Nu ai permisiunea pentru a folosi aceasta comanda.");
if(!IsPlayerAdmin(playerid))
if(!IsPlayerAdmin(playerid) && PlayerData[playerid][pAdmin] < 6)
if(!IsPlayerAdmin(playerid))
if(PlayerData[playerid][pAdmin] < 6 || !IsPlayerAdmin(playerid)) {
if(!IsPlayerAdmin(playerid))