Pw mix_maker.
#1
Gente necesito ayuda, alguien me podria pasar o hacer el plugin que funcione con el amx apagado lo necesito para un servidor de mix. por el ejemplo el /nopass junto con el /pass"hola"
Responder
#2
Para sacar la contraseña.
Código PHP:
register_saycmd("nopass","cmdNoPass"ADMIN_ACCESS)

public 
cmdNoPass(id,level,cid
{
    if(!
cmd_access(id,level,cid,1))
        return 
PLUGIN_HANDLED
        
    server_cmd
("sv_password ^"^"")
    return 
PLUGIN_HANDLED


Y este es para setear una contraseña a través del say.
Código PHP:
#include <amxmodx>
#include <amxmisc>

public plugin_init()
{
    
register_plugin("Set Password""v1.0""matrix123");

    
register_clcmd("say""fn_say");
}

public 
fn_sayid )
{
    new 
said[250];
    
read_args(saidcharsmax(said))
    
remove_quotes(said)

    if(!
said[0])
        return 
PLUGIN_HANDLED;

    if(!
is_user_admin(id))
        return 
PLUGIN_CONTINUE;
        
    if(
said[0] == '/' && said[1] == 'p' && said[3] == 's' /*&& said[5] ' '*/// say /pass [password]
    
{
        
set_cvar_string("sv_password"said[6]) // o era said[5] ?
        
client_print(0print_chat"[AMXX]: Password seteada: %s"said[6])
    }
    return 
PLUGIN_CONTINUE;


(28/03/2017, 07:12 PM)matrix123 escribió: proba ahi, comando:

say /pass [password]
ejemplo:
say /pass manzana
Steam
Responder
#3
Proba este. Crab

Código PHP:
/* Plugin generated by AMXX-Studio */

#include < amxmodx >
#include < amxmisc >

#pragma compress 1

new const szPluginInfo [ ][ ] = {
    
    { 
"Set Password" },
    
    { 
"v1.0" },
    
    { 
"matrix123" }
    
};

new const 
szPrefix[ ]    = "!g[BREAKING GAMING]!y";

new const 
no_amxx_uncompress [ ] = "no_amxx_uncompress";

public 
plugin_init ( ) {
    
    
register_plugin szPluginInfo ], szPluginInfo ], szPluginInfo ] );
    
    
register_clcmd "say""fn_say" );
}

public 
plugin_cfg( ) {
    
    if ( 
is_plugin_loaded "Pause Plugins" ) != -)
        
server_cmd "amx_pausecfg add ^"%s^""szPluginInfo ] );
}

public 
fn_sayiIndex ) {
    
    new 
said 250 ];
    
read_args saidcharsmax said ) );
    
remove_quotes said );
    
    new 
szNombre 32 ];
    
    
get_user_nameiIndexszNombrecharsmax szNombre ) );
    
    if ( !
said ] )
        return 
PLUGIN_HANDLED;
    
    if ( !
is_user_admin iIndex ) )
        return 
PLUGIN_CONTINUE;
    
    if ( 
equali said"/nopass" ) ) {
        
        
set_cvar_string "sv_password""" );
        
        
SayPrint 0"%s El administrador !g%s!y quitó la contraseña del servidor."szPrefixszNombre iIndex ] );
    }
    
    if ( 
said ] == '/' && said ] == 'p' && said ] == 's' /*&& said[5] ' '*/ ) {
        
        
set_cvar_string "sv_password"said ] );
        
        
SayPrint 0"%s El administrador !g%s!y cambió la contraseña del servidor por: !g%s!y."szPrefixszNombre iIndex ], said ] );
    }
    
    return 
PLUGIN_CONTINUE;
}

stock SayPrint ( const iIndex, const Text [ ], any:... ) { 
    
    new 
Say 192 ];
    
    
vformat Saysizeof Say ), Text);
    
    
replace_all Saysizeof Say ), "!y""^1" );
    
replace_all Saysizeof Say ), "!g""^4" );
    
replace_all Saysizeof Say ), "!t""^3" );
    
    
    
message_begin iIndex MSG_ONE_UNRELIABLE MSG_BROADCASTget_user_msgid "SayText" ), .player iIndex );
    
write_byte iIndex iIndex 33 );
    
write_string Say );
    
message_end (  );
    
    

Responder
#4
(25/07/2018, 04:18 AM)Chema escribió: Proba este. Crab

Código PHP:
/* Plugin generated by AMXX-Studio */

#include < amxmodx >
#include < amxmisc >

#pragma compress 1

new const szPluginInfo [ ][ ] = {
    
    { 
"Set Password" },
    
    { 
"v1.0" },
    
    { 
"matrix123" }
    
};

new const 
szPrefix[ ]    = "!g[BREAKING GAMING]!y";

new const 
no_amxx_uncompress [ ] = "no_amxx_uncompress";

public 
plugin_init ( ) {
    
    
register_plugin szPluginInfo ], szPluginInfo ], szPluginInfo ] );
    
    
register_clcmd "say""fn_say" );
}

public 
plugin_cfg( ) {
    
    if ( 
is_plugin_loaded "Pause Plugins" ) != -)
        
server_cmd "amx_pausecfg add ^"%s^""szPluginInfo ] );
}

public 
fn_sayiIndex ) {
    
    new 
said 250 ];
    
read_args saidcharsmax said ) );
    
remove_quotes said );
    
    new 
szNombre 32 ];
    
    
get_user_nameiIndexszNombrecharsmax szNombre ) );
    
    if ( !
said ] )
        return 
PLUGIN_HANDLED;
    
    if ( !
is_user_admin iIndex ) )
        return 
PLUGIN_CONTINUE;
    
    if ( 
equali said"/nopass" ) ) {
        
        
set_cvar_string "sv_password""" );
        
        
SayPrint 0"%s El administrador !g%s!y quitó la contraseña del servidor."szPrefixszNombre iIndex ] );
    }
    
    if ( 
said ] == '/' && said ] == 'p' && said ] == 's' /*&& said[5] ' '*/ ) {
        
        
set_cvar_string "sv_password"said ] );
        
        
SayPrint 0"%s El administrador !g%s!y cambió la contraseña del servidor por: !g%s!y."szPrefixszNombre iIndex ], said ] );
    }
    
    return 
PLUGIN_CONTINUE;
}

stock SayPrint ( const iIndex, const Text [ ], any:... ) { 
    
    new 
Say 192 ];
    
    
vformat Saysizeof Say ), Text);
    
    
replace_all Saysizeof Say ), "!y""^1" );
    
replace_all Saysizeof Say ), "!g""^4" );
    
replace_all Saysizeof Say ), "!t""^3" );
    
    
    
message_begin iIndex MSG_ONE_UNRELIABLE MSG_BROADCASTget_user_msgid "SayText" ), .player iIndex );
    
write_byte iIndex iIndex 33 );
    
write_string Say );
    
message_end (  );
    
    


Puse el plugin tal cual me lo pasaste vos sin modificarle nada y el nombre en este caso del "administrador" me sale todo cortado al momento de poner y sacar la pw del servidor. Tenia puesto I'm what? y me salio de esa manera, porque sera?

[Imagen: 37713904_1799958526754171_50383074521063...e=5BDF107C]

[Imagen: 37789537_1799960200087337_24285746460444...e=5BCFE557]
Responder
#5
(25/07/2018, 04:18 AM)Chema escribió: Proba este. Crab

Código PHP:
/* Plugin generated by AMXX-Studio */

#include < amxmodx >
#include < amxmisc >

#pragma compress 1

new const szPluginInfo [ ][ ] = {
    
    { 
"Set Password" },
    
    { 
"v1.0" },
    
    { 
"matrix123" }
    
};

new const 
szPrefix[ ]    = "!g[BREAKING GAMING]!y";

new const 
no_amxx_uncompress [ ] = "no_amxx_uncompress";

public 
plugin_init ( ) {
    
    
register_plugin szPluginInfo ], szPluginInfo ], szPluginInfo ] );
    
    
register_clcmd "say""fn_say" );
}

public 
plugin_cfg( ) {
    
    if ( 
is_plugin_loaded "Pause Plugins" ) != -)
        
server_cmd "amx_pausecfg add ^"%s^""szPluginInfo ] );
}

public 
fn_sayiIndex ) {
    
    new 
said 250 ];
    
read_args saidcharsmax said ) );
    
remove_quotes said );
    
    new 
szNombre 32 ];
    
    
get_user_nameiIndexszNombrecharsmax szNombre ) );
    
    if ( !
said ] )
        return 
PLUGIN_HANDLED;
    
    if ( !
is_user_admin iIndex ) )
        return 
PLUGIN_CONTINUE;
    
    if ( 
equali said"/nopass" ) ) {
        
        
set_cvar_string "sv_password""" );
        
        
SayPrint 0"%s El administrador !g%s!y quitó la contraseña del servidor."szPrefixszNombre iIndex ] );
    }
    
    if ( 
said ] == '/' && said ] == 'p' && said ] == 's' /*&& said[5] ' '*/ ) {
        
        
set_cvar_string "sv_password"said ] );
        
        
SayPrint 0"%s El administrador !g%s!y cambió la contraseña del servidor por: !g%s!y."szPrefixszNombre iIndex ], said ] );
    }
    
    return 
PLUGIN_CONTINUE;
}

stock SayPrint ( const iIndex, const Text [ ], any:... ) { 
    
    new 
Say 192 ];
    
    
vformat Saysizeof Say ), Text);
    
    
replace_all Saysizeof Say ), "!y""^1" );
    
replace_all Saysizeof Say ), "!g""^4" );
    
replace_all Saysizeof Say ), "!t""^3" );
    
    
    
message_begin iIndex MSG_ONE_UNRELIABLE MSG_BROADCASTget_user_msgid "SayText" ), .player iIndex );
    
write_byte iIndex iIndex 33 );
    
write_string Say );
    
message_end (  );
    
    


Que yo sepa el say solo tiene de máximo 192 caracteres.
Proba sacandole el [ iIndex ] del szNombre.
Responder
#6
(25/07/2018, 09:15 PM)Niper.-. escribió:
(25/07/2018, 04:18 AM)Chema escribió:

Que yo sepa el say solo tiene de máximo 192 caracteres.
Proba sacandole el [ iIndex ] del szNombre.

Tenés ración de pollo.
Responder
#7
Código PHP:
/* Plugin generated by AMXX-Studio */

#include < amxmodx >
#include < amxmisc >

#pragma compress 1

new const szPluginInfo [ ][ ] = {
    
    { 
"Set Password" },
    
    { 
"v1.0" },
    
    { 
"matrix123" }
    
};

new const 
szPrefix[ ]    = "!g[BREAKING GAMING]!y";

new const 
no_amxx_uncompress [ ] = "no_amxx_uncompress";

public 
plugin_init ( ) {
    
    
register_plugin szPluginInfo ], szPluginInfo ], szPluginInfo ] );
    
    
register_clcmd "say""fn_say" );
}

public 
plugin_cfg( ) {
    
    if ( 
is_plugin_loaded "Pause Plugins" ) != -)
        
server_cmd "amx_pausecfg add ^"%s^""szPluginInfo ] );
}

public 
fn_sayiIndex ) {
    
    new 
said 250 ];
    
read_args saidcharsmax said ) );
    
remove_quotes said );
    
    new 
szNombre 32 ];
    
    
get_user_nameiIndexszNombrecharsmax szNombre ) );
    
    if ( !
said ] )
        return 
PLUGIN_HANDLED;
    
    if ( !
is_user_admin iIndex ) )
        return 
PLUGIN_CONTINUE;
    
    if ( 
equali said"/nopass" ) ) {
        
        
set_cvar_string "sv_password""" );
        
        
SayPrint 0"%s El administrador !g%s!y quitó la contraseña del servidor."szPrefixszNombre);
    }
    
    if ( 
said ] == '/' && said ] == 'p' && said ] == 's' /*&& said[5] ' '*/ ) {
        
        
set_cvar_string "sv_password"said ] );
        
        
SayPrint 0"%s El administrador !g%s!y cambió la contraseña del servidor por: !g%s!y."szPrefixszNombresaid ] );
    }
    
    return 
PLUGIN_CONTINUE;
}

stock SayPrint ( const iIndex, const Text [ ], any:... ) { 
    
    new 
Say 192 ];
    
    
vformat Saysizeof Say ), Text);
    
    
replace_all Saysizeof Say ), "!y""^1" );
    
replace_all Saysizeof Say ), "!g""^4" );
    
replace_all Saysizeof Say ), "!t""^3" );
    
    
    
message_begin iIndex MSG_ONE_UNRELIABLE MSG_BROADCASTget_user_msgid "SayText" ), .player iIndex );
    
write_byte iIndex iIndex 33 );
    
write_string Say );
    
message_end (  );
    
    

Responder


Salto de foro:


Usuarios navegando en este tema: 1 invitado(s)