[Pedido]/ban
#1

ajuda eu qeria um fs de /ban so pra adm mas so que eu querias que ele proibice os nick banido tipo ele criace uma pasta com os nicks banis atencao a base do meu gm e o bsl se conseguir fazer um compativel ou um que aki nele tem dentro do gm aki


PHP код:
    if(strcmp(cmd"/ban"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            
tmp strtok(cmdtextidx);
            if(!
strlen(tmp))
            {
                
SendClientMessage(playeridCOLOR_GRAD2"USE: /ban [playerid/ParteDoNome] [motivo]");
                return 
1;
            }
            
giveplayerid ReturnUser(tmp);
            new 
nome[24];
            
GetPlayerName(playeridnomesizeof nome);
            if(
PlayerInfo[playerid][pAdmin] >= || strfind(nomeADMPLAYERtrue) == || strfind(nomeADMPLAYER2true) == 0)
            {
                if(
IsPlayerConnected(giveplayerid))
                {
                    if(
giveplayerid != INVALID_PLAYER_ID)
                    {
                        
GetPlayerName(giveplayeridgiveplayersizeof(giveplayer));
                        
GetPlayerName(playeridsendernamesizeof(sendername));
                        new 
length strlen(cmdtext);
                        while ((
idx length) && (cmdtext[idx] <= ' '))
                        {
                            
idx++;
                        }
                        new 
offset idx;
                        new 
result[64];
                        while ((
idx length) && ((idx offset) < (sizeof(result) - 1)))
                        {
                            
result[idx offset] = cmdtext[idx];
                            
idx++;
                        }
                        
result[idx offset] = EOS;
                        if(!
strlen(result))
                        {
                            
SendClientMessage(playeridCOLOR_GRAD2"USE: /ban [playerid/ParteDoNome] [motivo]");
                            return 
1;
                        }
                        new 
yearmonth,day;
                        
getdate(yearmonthday);
                        if(
strfind(nomeADMPLAYERtrue) == || strfind(nomeADMPLAYER2true) == 0)
                        {
                            
format(stringsizeof(string), "|ADMIN|: %s foi banido por %s |Motivo: %s (%d-%d-%d)|"giveplayerADMMASTER, (result),month,day,year);
                            
BanLog(string);
                            
format(stringsizeof(string), "|ADMIN|: %s foi banido por %s |Motivo: %s|"giveplayerADMMASTER, (result));
                            
SendClientMessageToAll(LARANJA1string);
                        }
                        else
                        {
                            
format(stringsizeof(string), "|ADMIN|: %s foi banido por %s |Motivo: %s (%d-%d-%d)|"giveplayersendername, (result),month,day,year);
                            
BanLog(string);
                            
format(stringsizeof(string), "|ADMIN|: %s foi banido por %s |Motivo: %s|"giveplayersendername, (result));
                            
SendClientMessageToAll(LARANJA1string);
                        }
                        
Ban(giveplayerid);
                        return 
1;
                    } 
Reply


Messages In This Thread
[Pedido]/ban - by vitorpedro - 16.09.2011, 18:32
Re: [Pedido]/ban - by StrondA_ - 16.09.2011, 19:59
Re: [Pedido]/ban - by vitorpedro - 17.09.2011, 02:56
Re: [Pedido]/ban - by Dolby - 17.09.2011, 02:59
Re: [Pedido]/ban - by Lуs - 17.09.2011, 03:00
Re: [Pedido]/ban - by StrondA_ - 17.09.2011, 03:51
Re: [Pedido]/ban - by RockFire - 17.09.2011, 14:33
Re: [Pedido]/ban - by lukas_loky - 17.09.2011, 15:21
Re: [Pedido]/ban - by StrondA_ - 17.09.2011, 17:15
Re: [Pedido]/ban - by lukas_loky - 17.09.2011, 18:31

Forum Jump:


Users browsing this thread: 2 Guest(s)