[Ajuda] /ban
#5

Desbanir Nik

PHP код:
    if(strcmp(cmd,"/nomedesban",true)==|| strcmp(cmd,"/desbanick",true)==|| strcmp(cmd,"/desbannome",true)==0// troque para um nome q vc lembre 
    
{
        if(
PlayerInfo[playerid][pAdmin] >= 1337)
        {
            if(
admtrampando[playerid] < && PlayerInfo[playerid][pAdmin] != 1343 && PlayerInfo[playerid][pAdmin] != 1341)
            {
                
SendClientMessage(playeridCOLOR_GRAD1"Vocк nгo estб trabalhando! (/trabalhar)");
                return 
1;
            }
            
tmp strtok(cmdtext,idx);
            if(!
strlen(tmp))
            {
                
SendClientMessage(playerid,COLOR_GRAD1,"USE: /nomedesban [NOME DO JOGADOR]");
                return 
1;
               }
               new 
arquivo[64];
            
format(arquivosizeof(arquivo), "Banidos/%s.ini",tmp);
            if(!
dini_Exists(arquivo))
            {
                
SendClientMessage(playerid,COLOR_GRAD1,"Nick nгo encontrado na base de dados");
                return 
1;
            }
            else
            {
                   
dini_Remove(arquivo);
            }
            
GetPlayerName(playeridsendernamesizeof(sendername));
            if(
admtrampando[playerid] == && admhide[playerid] == 1)
            {
                
format(string128"ADM: Chuck desbaniu o Nick %s",tmp);
                
ABroadCast(COLOR_YELLOW,string,1);
            }
            else
            {
                
format(string128"ADM: %s desbaniu o Nick %s"sendername,tmp);
                
ABroadCast(COLOR_YELLOW,string,1);
            }
        }
        return 
1;
    }
//---------- 
Desban Ip
PHP код:
if(strcmp(cmd,"/desbanip",true)==|| strcmp(cmd,"/unbanip",true)==0)
    {
        if(
PlayerInfo[playerid][pAdmin] >= 1337)
        {
            if(
admtrampando[playerid] < && PlayerInfo[playerid][pAdmin] != 1343 && PlayerInfo[playerid][pAdmin] != 1341)
            {
                
SendClientMessage(playeridCOLOR_GRAD1"Vocк nгo estб trabalhando! (/trabalhar)");
                return 
1;
            }
            
tmp strtok(cmdtext,idx);
            if(!
strlen(tmp))
            {
                
SendClientMessage(playerid,COLOR_GRAD1,"USE: /desbanip [IP DO JOGADOR]");
                return 
1;
               }
            
format(gstring128"IPsBanidos/%s.ini"tmp);
            if(!
dini_Exists(gstring))
            {
                
SendClientMessage(playerid,COLOR_GRAD1,"IP nгo encontrado na base de dados");
                return 
1;
            }
            else
            {
                
fremove(gstring);
                
GetPlayerName(playeridsendernamesizeof(sendername));
                
format(string128"ADM: %s desbaniu o IP %s"sendername,tmp);
                
ABroadCast(COLOR_YELLOW,string,1);
                return 
1;
            }
        }
        return 
1;
    } 
Reply


Messages In This Thread
/ban - by powerths - 03.09.2013, 19:31
Re: /ban - by willttoonn - 03.09.2013, 19:34
AW: /ban - by Smith. - 03.09.2013, 19:34
Re: /ban - by Juniiro3 - 03.09.2013, 19:37
Re: /ban - by Samuel300 - 03.09.2013, 19:42
Re: /ban - by Coe1 - 03.09.2013, 19:49

Forum Jump:


Users browsing this thread: 1 Guest(s)