[Ajuda] /banirip nao esta banindo ip
#1

Ola galera Boa Tarde O Meu /banirip Nao esta banindo ip alguem poderia me ajudar a resolver?

PHP код:
 if(strcmp(cmd"/banirip"true) == 0) {
        if(
GetPlayerLevel(playerid) < 4) return SendClientMessage(playerid,0xDEEE20FF,"Admin: Vocк nгo tem Nivel Necessбrio para usar este comando");
        new 
Hours,Minutes,Seconds,Days,Months,Years;
        
gettime(HoursMinutesSeconds);getdate(YearsMonthsDays);
        
tmp strtok(cmdtextidx);
        if(!
strlen(tmp)) {
            
SendClientMessage(playerid0x007FFFAA"USE: /banirip [playerid] [motivo]");
            return 
1;
        }
        new 
length strlen(cmdtext);
        while ((
idx length) && (cmdtext[idx] <= ' ')) {
            
idx++;
        }
        new 
offset idx;
        new 
reason[64];
        while ((
idx length) && ((idx offset) < (sizeof(reason) - 1))) {
            
reason[idx offset] = cmdtext[idx];
            
idx++;
        }
        
reason[idx offset] = EOS;
        new 
playa strval(tmp);
        
GetPlayerName(playagiveplayersizeof(giveplayer));
        
GetPlayerName(playeridNomePlayersizeof(NomePlayer));
        
format(stringsizeof(string), "*Admin: %s foi Banido pelo %s. Motivo: %s",giveplayer ,NomePlayerreason);
        
SendClientMessageToAll(0x007FFFAAstring);
        
SendClientMessage(playa,COLOR_GREEN,"____________________________________________________");
        
format(stringsizeof(string), "Vocк foi pego.O admin baniu vocк: %s"NomePlayer);
        
SendClientMessage(playa,0x007FFFAAstring);
        
format(stringsizeof(string),"Motivo: %s "reason);
        
SendClientMessage(playa,0x007FFFAAstring);
        
format(stringsizeof(string), "Data: %d/%d/%d"Days,Months,Years);
        
SendClientMessage(playa,0x007FFFAA,string);
        
format(stringsizeof(string), "Hora %d:%d:%d",Hours,Minutes,Seconds);
        
SendClientMessage(playa,0x007FFFAA,string);
        
SendClientMessage(playa,COLOR_GREEN,"____________________________________________________");
        
Ban(playa);
        return 
1;
    } 
Reply
#2

pawn Код:
Ban(playa);
por
pawn Код:
BanEx(playa, reason);
Native da a_samp.inc
pawn Код:
native BanEx(playerid, const reason[]);
Reply
#3

[quote=Nill.Oliveira;2680152]
pawn Код:
Ban(playa);
por
pawn Код:
BanEx(playa, reason);


Desculpa e que eu sou meio nub em pawn mas em que parte do Gm tenho que colocar esse

Native da a_samp.inc
pawn Код:
native BanEx(playerid, const reason[]);
Reply
#4

Server Travo depois que loguei depois que coloquei isso que vc falou

mas nao coloquei o native coloquei so o 1 ali
Reply
#5

manow vc qr um comando q da ban sу o ip ? ou da ban a acc eo ip ... vo te passa o cod de ban q ta em meu gm

PHP код:
if(strcmp(cmd"/ban"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            
tmp strtok(cmdtextidx);
            if(!
strlen(tmp))
            {
                
SendClientMessage(playeridCOLOR_GRAD2"USE: /ban [id] [motivo]");
                return 
1;
            }
            
giveplayerid ReturnUser(tmp);
            if (
PlayerInfo[playerid][pAdmin] >= 3)
            {
                if(
admtrampando[playerid] < && PlayerInfo[playerid][pAdmin] != 1342 && PlayerInfo[playerid][pAdmin] != 1341)
                {
                    
SendClientMessage(playeridCOLOR_GRAD1"Vocк nгo estб trabalhando! (/trabalhar)");
                    return 
1;
                }
                if(
IsPlayerConnected(giveplayerid))
                {
                    if(
giveplayerid != INVALID_PLAYER_ID)
                    {
                        if(
PlayerInfo[giveplayerid][pAdmin] >= 1340)
                        {
                            
SendClientMessage(playeridCOLOR_GRAD1"Vocк nгo pode banir um Admin Dono !");
                            return 
1;
                        }
                        
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 [id] [motivo]");
                            return 
1;
                        }
                        
getdate(yearmonthday);
                        if(
admtrampando[playerid] == && admhide[playerid] == 1)
                        {
                            
format(stringsizeof(string), "AdmCmd: %s foi banido por Chuck(Modo Cia), Motivo: %s (%d-%d-%d)"giveplayer,(result),day,month,year);
                            
//BanLog(string);
                            
format(stringsizeof(string), "AdmCmd: %s foi banido por Chuck, Motivo: %s"giveplayer,(result));
                            
SendClientMessageToAll(COLOR_LIGHTREDstring);
                        }
                        else
                        {
                            
format(stringsizeof(string), "AdmCmd: %s foi banido por %s, Motivo: %s (%d-%d-%d)"giveplayersendername, (result),day,month,year);
                            
BanLog(string);
                            
format(stringsizeof(string), "AdmCmd: %s foi banido por %s, Motivo: %s"giveplayersendername, (result));
                            
SendClientMessageToAll(COLOR_LIGHTREDstring);
                        }
                        
SendClientMessage(giveplayeridCOLOR_WHITE"{FFFFFF}__ Instruзхes para revisгo de Ban __");
                        
SendClientMessage(giveplayeridCOLOR_YELLOW2"Tire uma SS da tela apertando F8 imediatamente apуs ser banido");
                        
SendClientMessage(giveplayeridCOLOR_YELLOW2"E acesse o nosso forum: www.brasilmegavirtual.forumeiros.com"); // Aqui coloque o seu forum *-*
                        
SendClientMessage(giveplayeridCOLOR_LIGHTRED"Atenзгo: Vocк sу serб desbanido caso for inocente");
                        
//Ban(giveplayerid);
                        
SBan(giveplayeridresultsendername);
                        return 
1;
                    }
                }
//not connected
            
}
            else
            {
                
SendClientMessage(playeridCOLOR_GRAD1"   Esse nгo й um jogador ativo.");
            }
        } 
Reply
#6

Quote:
Originally Posted by Samuel300
Посмотреть сообщение
manow vc qr um comando q da ban sу o ip ? ou da ban a acc eo ip ... vo te passa o cod de ban q ta em meu gm

PHP код:
if(strcmp(cmd"/ban"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            
tmp strtok(cmdtextidx);
            if(!
strlen(tmp))
            {
                
SendClientMessage(playeridCOLOR_GRAD2"USE: /ban [id] [motivo]");
                return 
1;
            }
            
giveplayerid ReturnUser(tmp);
            if (
PlayerInfo[playerid][pAdmin] >= 3)
            {
                if(
admtrampando[playerid] < && PlayerInfo[playerid][pAdmin] != 1342 && PlayerInfo[playerid][pAdmin] != 1341)
                {
                    
SendClientMessage(playeridCOLOR_GRAD1"Vocк nгo estб trabalhando! (/trabalhar)");
                    return 
1;
                }
                if(
IsPlayerConnected(giveplayerid))
                {
                    if(
giveplayerid != INVALID_PLAYER_ID)
                    {
                        if(
PlayerInfo[giveplayerid][pAdmin] >= 1340)
                        {
                            
SendClientMessage(playeridCOLOR_GRAD1"Vocк nгo pode banir um Admin Dono !");
                            return 
1;
                        }
                        
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 [id] [motivo]");
                            return 
1;
                        }
                        
getdate(yearmonthday);
                        if(
admtrampando[playerid] == && admhide[playerid] == 1)
                        {
                            
format(stringsizeof(string), "AdmCmd: %s foi banido por Chuck(Modo Cia), Motivo: %s (%d-%d-%d)"giveplayer,(result),day,month,year);
                            
//BanLog(string);
                            
format(stringsizeof(string), "AdmCmd: %s foi banido por Chuck, Motivo: %s"giveplayer,(result));
                            
SendClientMessageToAll(COLOR_LIGHTREDstring);
                        }
                        else
                        {
                            
format(stringsizeof(string), "AdmCmd: %s foi banido por %s, Motivo: %s (%d-%d-%d)"giveplayersendername, (result),day,month,year);
                            
BanLog(string);
                            
format(stringsizeof(string), "AdmCmd: %s foi banido por %s, Motivo: %s"giveplayersendername, (result));
                            
SendClientMessageToAll(COLOR_LIGHTREDstring);
                        }
                        
SendClientMessage(giveplayeridCOLOR_WHITE"{FFFFFF}__ Instruзхes para revisгo de Ban __");
                        
SendClientMessage(giveplayeridCOLOR_YELLOW2"Tire uma SS da tela apertando F8 imediatamente apуs ser banido");
                        
SendClientMessage(giveplayeridCOLOR_YELLOW2"E acesse o nosso forum: www.brasilmegavirtual.forumeiros.com"); // Aqui coloque o seu forum *-*
                        
SendClientMessage(giveplayeridCOLOR_LIGHTRED"Atenзгo: Vocк sу serб desbanido caso for inocente");
                        
//Ban(giveplayerid);
                        
SBan(giveplayeridresultsendername);
                        return 
1;
                    }
                }
//not connected
            
}
            else
            {
                
SendClientMessage(playeridCOLOR_GRAD1"   Esse nгo й um jogador ativo.");
            }
        } 
vlw pela ajuda cara mas esse /ban ai nao serve no meu server
Reply
#7

Obrigado A Todos Que Ajudaram Ja Consegui resolver
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)