SA-MP Forums Archive
Owner & Admin problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Owner & Admin problem (/showthread.php?tid=441091)



Owner & Admin problem - [..MonTaNa..] - 01.06.2013

Removed.


Re: Owner & Admin problem - Rillo - 01.06.2013

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;
}



Re: Owner & Admin problem - Konstantinos - 01.06.2013

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.


Re: Owner & Admin problem - [..MonTaNa..] - 01.06.2013

Removed.


Re: Owner & Admin problem - Rillo - 01.06.2013

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 :/


.......