[Ajuda] alguem ajuda a Arrumar meu ban pra ele salvar?
#1

fico grato desde ja ;-;

Код:
CMD:ban(playerid, params[])
{
	
	if(PlayerInfo[playerid][Admin]  >= 2){
	if(sscanf(params,"us[158]",ID,Texto))
	{
	    SendClientMessage(playerid,-1,"{FF0000}< Erro > {C3C3C3}USO: /ban [id] [motivo]");
 	}
 	else
 	{
 	if(!IsPlayerConnected(ID))return SendClientMessage(playerid,-1,"{FF0000}< Erro > {C3C3C3} Jogador nгo Conectado!");
 	if(Owner[ID] == true) return 0;
 	GetPlayerName(playerid,NomeP,MAX_PLAYER_NAME);
 	GetPlayerName(ID,NomeID,MAX_PLAYER_NAME);
 	gettime(Horas,Minutos,Segundos);
 	getdate(Ano,Mes,Dia);
 	format(CBDStr, sizeof(CBDStr),"***Administrador '%s' Baniu '%s' (Motivo: %s ) [Data: %d/%d/%d] [Hora: %d:%02d:%02d]",NomeP,NomeID,Texto,Dia,Mes,Ano,Horas,Minutos,Segundos);
 	SendClientMessageToAll(cinza,CBDStr);
 	
	PlayerInfo[playerid][Banido] = 1;
	format(CBDStr, sizeof CBDStr,"Admin: %s\nMotivo: %s\nData: %d/%d/%d\nHora: %d:%02d:%02d",Nome(playerid),Texto,Dia,Mes,Ano,Horas,Minutos,Segundos);
	ShowPlayerDialog(ID,122,DIALOG_STYLE_MSGBOX,"Banido Do Servidor!",CBDStr,"Sair","");
 	Ban(ID);
 	}
 	} else SendClientMessage(playerid,-1,"{FF0000}< Erro > {C3C3C3} Vocк precisa ser Administrador para usar esse Comando!");
    return 1;
}
Reply
#2

Meu Sistema De Ban. Contem /banir /desbanir - /banoff /desbanoff (Banir e desbanir player OFF) /banirip /desbanirip


PHP код:
    if( !strcmpcmd"/ban"true ))
    {
        if( 
aInfoplayerid ][ Admin ] == || aInfoplayerid ][ Moderador ] == )
        {
            
tmp strtokcmdtextidx );
            if( !
strlentmp ))
            {
                
SendClientMessageplayeridCOLOR_ERRO"[ x ] Uso correto: /Ban [ ID ] [ Motivo ]" );
                return 
1;
            }
            new
                
id strvaltmp )
            ;
            
MSG strrestcmdtextidx );
            if( !
strlenMSG ))
            {
                
SendClientMessageplayeridCOLOR_ERRO"[ x ] Uso correto: /Ban [ ID ] [ Motivo ]" );
                return 
1;
             }
            if( !
IsPlayerConnectedid ))
            {
                
SendClientMessageplayeridCOLOR_ERRO"[ x ] Ninguйm online com esse ID !" );
                return 
1;
            }
            if( 
aInfoplayerid ][ Oculto ] == false )
            {
                if( 
aInfoplayerid ][ Moderador ] == )
                {
                    
formatstringsizeof( string ), "[ BPO ADMIN ] Vocк foi banido pelo(a) moderador(a) %s [ Motivo: %s ]"PlayerNameplayerid ), MSG );
                    
SendClientMessageid0x00FF66AAstring );
                    
formatstringsizeof( string ), "[ BPO ADMIN ] Vocк baniu o jogador(a) %s [ Motivo: %s ]"PlayerNameid ), MSG );
                    
SendClientMessageplayerid0x00FF66AAstring );
                    
formatstringsizeof( string ), "[ BPO ADMIN ] O(A) moderador(a) %s baniu o(a) jogador(a) %s ( Motivo: %s )"PlayerNameplayerid ), PlayerNameid ), MSG );
                    
SendClientMessageToAll0x1E90FFAAstring );
                    
GameTextForPlayerid"~r~BANIDO(A)~w~!"8000);
                    
SendClientMessageid0xFFFFFFAA"[ x ] Duvidas Visite nosso forum abaixo" );
                    
SendClientMessageid0xFFFFFFAA"[ x ] Link url: {6699CC}SEU FУRUM AQUI" );
                    
dini_IntSetfid ), "Banido");
                    
dini_Setfid ), "MotivoBan"MSG );
                    
dini_Setfid ), "BanidoPor"PlayerNameplayerid ));
                    return 
Banid ), 1;
                }
                if( 
aInfoplayerid ][ Admin ] == )
                {
                    
formatstringsizeof( string ), "[ BPO ADMIN ] Vocк foi banido pelo(a) administrador(a) %s [ Motivo: %s ]"PlayerNameplayerid ), MSG );
                    
SendClientMessageid0x00FF66AAstring );
                    
formatstringsizeof( string ), "[ BPO ADMIN ] Vocк baniu o jogador(a) %s [ Motivo: %s ]"PlayerNameid ), MSG );
                    
SendClientMessageplayerid0x00FF66AAstring );
                    
formatstringsizeof( string ), "[ BPO ADMIN ] O(A) administrador(a) %s baniu o(a) jogador(a) %s ( Motivo: %s )"PlayerNameplayerid ), PlayerNameid ), MSG );
                    
SendClientMessageToAll0x1E90FFAAstring );
                    
GameTextForPlayerid"~r~BANIDO(A)~w~!"8000);
                    
SendClientMessageid0xFFFFFFAA"[ x ] Duvidas Visite nosso forum abaixo" );
                    
SendClientMessageid0xFFFFFFAA"[ x ] Link url: {6699CC}SEU FУRUM AQUI" );
                    
dini_IntSetfid ), "Banido");
                    
dini_Setfid ), "MotivoBan"MSG );
                    
dini_Setfid ), "BanidoPor"PlayerNameplayerid ));
                    return 
Banid ), 1;
                }
            }
            else
            {
                
GameTextForPlayerid"~r~BANIDO(A)~w~!"8000);
                
SendClientMessageid0xFFFFFFAA"[ x ] Duvidas Visite nosso forum abaixo" );
                
SendClientMessageid0xFFFFFFAA"[ x ] Link url: {6699CC}SEU FУRUM AQUI" );
                
dini_IntSetfid ), "Banido");
                
dini_Setfid ), "MotivoBan"MSG );
                
dini_Setfid ), "BanidoPor"PlayerNameplayerid ));
                return 
Banid ), 1;
            }
        }
        return 
1;
     }
    if( !
strcmpcmd"/banoff"true ))
    {
        if( 
aInfoplayerid ][ Admin ] == || aInfoplayerid ][ Moderador ] == )
        {
            
tmp strtokcmdtextidx );
            if( !
strlentmp ))
            {
                
SendClientMessageplayeridCOLOR_ERRO"[ x ] Uso: correto /BanOFF [ Nick ]" );
                return 
1;
            }
            
formatgFilesizeofgFile ), "Contas/%s.ini"tmp );
              if( !
fexistgFile ))
            {
                
SendClientMessageplayeridCOLOR_ERRO"[ x ] Nгo existe nenhuma conta com esse nick !" );
                return 
1;
            }
            if( 
dini_IntgFile"Banido" ) == )
            {
                
SendClientMessageplayeridCOLOR_ERRO"[ x ] Essa conta jб estб banida !" );
                return 
1;
            }
            
dini_IntSetgFile"Banido");
            foreach(
Player)
            {
                if( 
aInfo][ Admin ] == || aInfo][ Moderador ] == )
                {
/*                    format( gstring, sizeof( gstring ), "[ BAN ] %s foi banidoOFF pelo admin/mod %s", tmp, PlayerName( playerid ));
                       SendClientMessage( i, 0xBCE635AA, gstring );*/
                   
}
            }
        }
        return 
1;
    }
    if( !
strcmpcmd"/desbanir"true ))
    {
        if( 
aInfoplayerid ][ Admin ] == || aInfoplayerid ][ Moderador ] == )
        {
            
tmp strtokcmdtextidx );
            if( !
strlentmp ))
            {
                
SendClientMessageplayeridCOLOR_ERRO"[ x ] Uso: correto /Desbanir [ Nick ]" );
                return 
1;
            }
            
formatgFilesizeofgFile ), "Contas/%s.ini"tmp );
              if( !
fexistgFile ))
            {
                
SendClientMessageplayeridCOLOR_ERRO"[ x ] Nгo existe nenhuma conta com esse nick !" );
                return 
1;
            }
            if( 
dini_IntgFile"Banido" ) == )
            {
                
SendClientMessageplayeridCOLOR_ERRO"[ x ] Essa conta nгo estб banida !" );
                return 
1;
            }
            
dini_IntSetgFile"Banido");
            foreach(
Player)
            {
                if( 
aInfo][ Admin ] == || aInfo][ Moderador ] == )
                {
/*                    format( gstring, sizeof( gstring ), "[ DESBAN ] %s foi desbanido pelO(A) administrador(a) %s", tmp, PlayerName( playerid ));
                       SendClientMessage( i, 0xBCE635AA, gstring );*/
                   
}
            }
        }
        return 
1;
    }
    if( !
strcmpcmd"/desbanirip"true ))
    {
        if( 
aInfoplayerid ][ Admin ] == || aInfoplayerid ][ Moderador ] == )
        {
            
tmp strtokcmdtextidx );
            if( !
strlentmp ))
            {
                
SendClientMessageplayeridCOLOR_ERRO"[ x ] Uso correto: /DesbanirIP [ IP ]" );
                return 
1;
             }
             
formatgStrsizeofgStr ), "unbanip %s"tmp );
            
SendRconCommandgStr );
            
SendRconCommand"reloadbans" );
            foreach(
Player)
            {
                if( 
aInfo][ Admin ] == || aInfo][ Moderador ] == )
                {
/*                    format( gstring, sizeof( gstring ), "[ DESBAN-IP ] IP: %s foi desbanido pelO(A) administrador(a) %s", tmp, PlayerName( playerid ));
                       SendClientMessage( i, 0xBCE635AA, gstring );*/
                   
}
            }
        }
        return 
1;
    } 
Mensagem de tela de login para player banidos

PHP код:
    if( dini_Intfplayerid ), "Banido" ) == )
    {
        
SendClientMessageplayerid0xFFFFFFAA"[ x ] Vocк estб banido(a) !" );
        
SendClientMessageplayerid0xFFFFFFAA"[ x ] Visite nosso forum para tentar reverter essa situaзao." );
        
SendClientMessageplayerid0xFFFFFFAA"[ x ] Link url: {6699CC}SEU FУRUM AQUI" );
        
SetTimerEx"Banido"1125false"d"playerid );
    } 
E adicione isso no lugar certo do seu GM para criar a aba BANIDO no INI do player

PHP код:
             dini_IntSetgFile"Banido"); 
ESPERO QUE DК CERTO !!!
Reply
#3


Qual include vocк usa?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)