offline ban
#1

this is my oban code but i need is player admin other admin cant use oban on him.
PHP код:
CMD:oban(playeridparams[])
{
    if(
PlayerInfo[playerid][pAdmin] ==10 || IsPlayerAdmin(playerid))
    {
        new 
targetname[24], filestring[79], adminname[MAX_PLAYER_NAME];
        if(
sscanf(params"s[24]"targetname)) return SendClientMessage(playeridCOLOR_RED"USAGE: /oban [Player's Name]");
        
format(filestringsizeof(filestring), "/Asystem/Users/%s.ini"targetname);
        if(!
fexist(filestring)) return SendClientMessage(playeridCOLOR_RED"[Error]: The player name you have chosen was not found in our system.");
        else
        {
            
GetPlayerName(playeridadminnamesizeof(adminname));
            new 
INI:File INI_Open(filestring);
            
INI_SetTag(File"data");
            
INI_WriteInt(File"Ban"1);
            
INI_Close(File);
            new 
done[128];
            
format(donesizeof(done), "[BAN] Admin %s (id:%d) Offlinebanned %s from server."adminnameplayeridtargetname);
            
SendClientMessageToAll(COLOR_REDdone);
            return 
1;
        }
    }
    else return 
SendClientMessage(playerid,COLOR_RED,"You do not have permission to use this command!");

Reply


Messages In This Thread
offline ban - by GeneralAref - 20.12.2015, 07:56
Re: offline ban - by Stanislaus - 20.12.2015, 08:43
Re: offline ban - by GeneralAref - 20.12.2015, 08:47
Re: offline ban - by DRIFT_HUNTER - 20.12.2015, 08:52

Forum Jump:


Users browsing this thread: 1 Guest(s)