Owner & Admin problem
#1

Removed.
Reply
#2

pawn Код:
CMD:ban(playerid, params[])
{
    if(!IsCnRAdmin(playerid)) return UnknownCMD(playerid);
    new pID, reason[128];
    if(sscanf(params, "uS", pID, reason)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /ban (Nick/ID) (Reason)");
    if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, COLOR_RED, "This Player Is Not Connected.");
    if(pID == cellmin) return SendClientMessage(playerid, COLOR_RED, "Multiple Players Found. Please Be More Specific.");
    if(pID == playerid) return SendClientMessage(playerid, COLOR_RED, "You Cannot Use This Command On Yourself.");
    if(IsCnRAdmin(playerid) && IsCnROwner(pID)) return SendClientMessage(playerid, COLOR_RED, "You Cannot Use This Command On Other Admins.");
    new string[128], log[128];
    format(string, sizeof string, "Administrator has banned %s (%d)  Reason: %s", PlayerName(pID), pID, reason[0] ? reason : "No Reason Given");
    AdminCMD(playerid, "BAN");
    SendClientMessageToAll(COLOR_PINK, string);
    format(log, sizeof log, "Admin %s Has Banned %s. Reason: %s", PlayerName(playerid), PlayerName(pID), reason[0] ? reason : "No Reason Given");
    SetTimerEx("BanTimer", 800, false, "is", pID, reason);
    LogToFile("ban", log);
    return 1;
}
Reply
#3

Show us "LogToFile". I assume it's something with the issue file.inc has. If something is not opened or created etc, the server gets crashed.
Reply
#4

Removed.
Reply
#5

Quote:

If an admin level 1 (regular admin) tries to /ban me (level 2 aka server owner) he gets "You Cannot Use This Command On Other Admins"What I want is, you CANNOT use this command on other admins..

Quote:
Originally Posted by MonTaNaAa
Посмотреть сообщение
I said it worked before, I don't think changing place with IsCnROwner & IsCnRAdmin will solve the problem :/


.......
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)