HOLA NECESITO UN PLUGINS
#1
necesito un plugins para restringir los nombres dentro del server que no los deje cambiar dentro del server el nombre al jugadore si intenta mas de 3 veces kick
advertirle

me ayudan ?


gracias foro
Responder
#2
No lo probé, avisa sí te funciona.

Código PHP:
/*
    | INFORMACIÓN |

    # Este PLUGIN ha sido creado por Chema.
*/

#include < amxmodx >
// #include < amxmisc >
// #include < cstrike >
// #include < engine >
#include < fakemeta >
// #include < hamsandwich >
// #include < fun >
// #include < xs >
// #include < sqlx >

new CHAT_PREFIX[ ] = "!g[ vG ]!y";
new 
CONSOLE_PREFIX[ ] = "[ vG ]";

const 
MAX_ATTEMPTS 3;

new 
g_iAttempts33 ];

new 
g_szPlayerName33 ][ 32 ];

public 
plugin_init( ) {
    
    
register_plugin"Block Name Change""1.0""Chema" );
    
    
/*
        | CÓDIGO |

        # Agrega tú código aquí...
    */
    
    
register_forwardFM_ClientUserInfoChanged"FM_UserInfoChanged" );
}

public 
client_putinserverid ) {
    
    
get_user_nameidg_szPlayerNameid ], sizeofg_szPlayerName ) );
    
    
g_iAttemptsid ] = 0;
}

public 
FM_UserInfoChangedidszBuffer ) {
    
    if( 
is_user_connectedid ) ) {
    
        new 
szNewName 33 ];
            
        
engfuncEngFunc_InfoKeyValueszBuffer"name"szNewNamesizeofszNewName ) );
            
        if( !
equalg_szPlayerNameid ], szNewName ) ){
                
            
engfuncEngFunc_SetClientKeyValueidszBuffer"name"g_szPlayerNameid ] );
            
            
client_cmdid"name ^"%s^""g_szPlayerNameid ] );
            
            if( 
g_iAttemptsid ] >= ) {
                
                
server_cmd"kick #%d ^"Has intentado cambiar el nombre 3 veces.^""get_user_useridid ) );
                
                
g_iAttemptsid ] = 0;
            }
            
            
g_iAttemptsid ]++;
            
            
ColorChatid"Has intentado cambiar el nombre !g%i!y/!g%i!y."g_iAttemptsid ], MAX_ATTEMPTS );
            
console_printid"%s Has intentado cambiar el nombre %i/%i."CONSOLE_PREFIXg_iAttemptsid ], MAX_ATTEMPTS );
        }
    }
    
    return 
FMRES_IGNORED;
}

stock ColorChat( const id, const Text[ ], any:... ) { 
    
    new 
count 1players32 ];
    static 
msg191 ], leni;
    
    
len formatexmsgcharsmax(msg), "%s "CHAT_PREFIX );
    
vformatmsglen ], 190 lenText);
    
    
replace_allmsg190"!g""^4" );
    
replace_allmsg190"!y""^1" );
    
replace_allmsg190"!t""^3" );
    
    static 
iLen sizeofmsg );
    
    
replace_allmsgiLen"á""á" );
    
replace_allmsgiLen"Á""Ã" );
    
replace_allmsgiLen"é""é" );
    
replace_allmsgiLen"É""É" );
    
replace_allmsgiLen"í""Ã*" );
    
replace_allmsgiLen"Í""Ã" );
    
replace_allmsgiLen"ó""ó" );
    
replace_allmsgiLen"Ó""Ó" );
    
replace_allmsgiLen"ú""ú" );
    
replace_allmsgiLen"Ú""Ú" );
    
replace_allmsgiLen"ñ""ñ" );
    
replace_allmsgiLen"Ñ""Ñ" );
    
    
    if( 
id 
        
players] = id;
    else 
        
get_playersplayerscount"ch" );
             
    for( 
0count; ++i) {
        
        if( 
is_user_connectedplayers] ) ) 
            
writeMessageplayers], msg );    
    }
}

stock writeMessageplayermessage[ ] ) {
    
    
message_beginMSG_ONEget_user_msgid"SayText" ), { 00}, player );
    
write_byteplayer );
    
write_stringmessage );
    
message_end( );

Responder


Salto de foro:


Usuarios navegando en este tema: 1 invitado(s)