08/06/2019, 10:31 PM
(Última modificación: 11/06/2019, 12:26 PM por rosario. Edited 2 times in total.)
Como puedo acomodar estas lineas de error que me tiran en logs estoy usando el resetscore de chema compilado con versión 1.9.0 me salta este detalle
LOGS DE ERROR
CÓDIGO SMA
LOGS DE ERROR
Código PHP:
L 06/07/2019 - 02:26:24: Start of error session.
L 06/07/2019 - 02:26:24: Info (map "fy_out") (file "addons/amxmodx/logs/error_20190607.log")
L 06/07/2019 - 02:26:24: [FUN] Invalid player 4
L 06/07/2019 - 02:26:24: [AMXX] Displaying debug trace (plugin "FDZ_ResetScore.amxx", version "1.2")
L 06/07/2019 - 02:26:24: [AMXX] Run time error 10: native error (native "set_user_frags")
L 06/07/2019 - 02:26:24: [AMXX] [0] FDZ_ResetScore.sma::apply_reset (line 119)
L 06/07/2019 - 02:26:24: [AMXX] [1] FDZ_ResetScore.sma::check_reset (line 108)
CÓDIGO SMA
Código PHP:
/* Plugin generated by AMXX-Studio */
#include < amxmodx >
#include < amxmisc >
#include < cstrike >
#include < fun >
new const szPluginInfo [ ][ ] = {
{ "[AMXX] RESET SCORE WITH TIMER" },
{ "1.2" },
{ "Chema" }
};
new const g_sCommunity[ ] = "!g[BREAKING GAMING]!y";
new const g_sUncompress[ ] = "no_amxx_uncompress";
new const g_sSayCommands [ ] [ ] = {
"say /resetscore",
"say /rs",
"say_team /resetscore",
"say_team /rs"
};
new Float:g_fTimer[33];
new g_sPlayerName [ 33 ] [ 32 ];
enum pCvarsStruct {
PLUGIN_ACTIVE,
RS_TIME,
RS_ADMIN,
RS_ADMIN_TIME
}
new pCvars [ pCvarsStruct ];
public plugin_init ( ) {
register_plugin ( szPluginInfo [ 0 ], szPluginInfo [ 1 ], szPluginInfo [ 2 ] );
for ( new id; id < sizeof g_sSayCommands; id++ ) {
register_clcmd ( g_sSayCommands [ id ], "check_reset" );
}
pCvars [ PLUGIN_ACTIVE ] = register_cvar ( "rst_active", "1" );
pCvars [ RS_TIME ] = register_cvar ( "rst_time", "30.0" );
pCvars [ RS_ADMIN ] = register_cvar ( "rst_admin", "1" );
pCvars [ RS_ADMIN_TIME ] = register_cvar ( "rst_admin_time", "15.0" );
server_print ( g_sUncompress );
}
public plugin_cfg ( ) {
/* Para que el plugin se cargue con amx_off */
if ( is_plugin_loaded ( "Pause Plugins" ) != -1 )
server_cmd ( "amx_pausecfg add ^"%s^"", szPluginInfo [ 0 ] );
}
public check_reset ( id ) {
if ( !get_pcvar_num ( pCvars [ PLUGIN_ACTIVE ] ) )
return PLUGIN_CONTINUE;
new Float:fGameTime = get_gametime ( );
if ( g_fTimer [ id ] > fGameTime ) {
PrintText ( id, "%s Tenés que esperar !g%.2f!y segundos para volver a reiniciar tus estadisticas.", g_sCommunity, ( g_fTimer [ id ] - fGameTime ) );
return PLUGIN_HANDLED;
}
if ( get_pcvar_num ( pCvars [ RS_ADMIN ] ) ) {
if ( is_user_admin ( id ) ) {
g_fTimer [ id ] = fGameTime + get_pcvar_float ( pCvars [ RS_ADMIN_TIME ] );
}
}
else {
g_fTimer [ id ] = fGameTime + get_pcvar_float ( pCvars [ RS_TIME ] );
}
apply_reset ( id );
return PLUGIN_HANDLED;
}
public apply_reset ( id ) {
get_user_name ( id, g_sPlayerName [ id ], charsmax ( g_sPlayerName ) );
PrintText ( id, "%s El jugador !g%s!y a reinciado sus estadisticas, !t(!g %d!t Frags!y |!g %d!t Muertes )!y.", g_sCommunity, g_sPlayerName [ id ], get_user_frags ( id ), get_user_deaths ( id ) );
set_user_frags ( id, 0 );
cs_set_user_deaths ( id, 0 );
set_user_frags ( id, 0 );
cs_set_user_deaths ( id, 0 );
/* ACTUALIZAR EL SCOREBOARD AL INSTANTE */
message_begin ( MSG_ALL, 85 );
write_byte ( id );
write_short ( 0 );
write_short ( 0 );
write_short ( 0 );
write_short ( 0 );
message_end ( );
}
stock PrintText ( const iIndex, const Text [ ], any:... ) {
new szText [ 192 ];
vformat ( szText, sizeof ( szText ), Text, 3 );
replace_all ( szText, sizeof ( szText ), "!y", "^1" );
replace_all ( szText, sizeof ( szText ), "!g", "^4" );
replace_all ( szText, sizeof ( szText ), "!t", "^3" );
static iLen = sizeof ( szText );
replace_all ( szText, iLen, "á", "á" );
replace_all ( szText, iLen, "Á", "Ã" );
replace_all ( szText, iLen, "é", "é" );
replace_all ( szText, iLen, "É", "É" );
replace_all ( szText, iLen, "í", "Ã*" );
replace_all ( szText, iLen, "Í", "Ã" );
replace_all ( szText, iLen, "ó", "ó" );
replace_all ( szText, iLen, "Ó", "Ó" );
replace_all ( szText, iLen, "ú", "ú" );
replace_all ( szText, iLen, "Ú", "Ú" );
replace_all ( szText, iLen, "ñ", "ñ" );
replace_all ( szText, iLen, "Ñ", "Ñ" );
message_begin ( iIndex ? MSG_ONE_UNRELIABLE : MSG_BROADCAST, get_user_msgid ( "SayText" ), .player = iIndex );
write_byte ( iIndex ? iIndex : 33 );
write_string ( szText );
message_end ( );
}
»» RENTA TU SERVIDOR EN EVOLUTIÓN-HOST ««
Si deseas contactarme para comprar tu servidor de counter-strike puedes enviar un M.P