Mensajes: 44
Temas: 7
Registro en: May 2014
Reputación:
0
Tengo un muy raro error que me volvió loco así que veo si me pueden dar una mano.
Tengo:
Código PHP: #define MYSQL_HOST "127.0.0.1" #define MYSQL_USER "Global" #define MYSQL_PASS "testparaaliedmodders" #define MYSQL_DB "zombieplague"
Código PHP: // Sql new TABLE[] = "cuentas" new Handle:SqlTpl new Handle:g_Mysql
y en wamp tengo la database zombieplague, el usuario global con permisos seteados al 100%, con esa password. que adentro tiene la tabla cuentas;
donde esta el tema?
al iniciar el hlds (steamcmd) si tengo prendido el wamp (en teoría, si se logra conectar a la db) se cierra automáticamente y no deja ningún log.
pero en cambio, si al iniciar el hlds tengo apagado el wamp, entonces inicia pero obviamente no conecta a la database y por ende el plugin se cierra...
es muy extraño, alguien puede darme una mano?
Mensajes: 3,466
Temas: 18
Registro en: Oct 2013
Reputación:
54
El HLDS no deja ningun log y se cierra?
Y bueno que si no pasas code dificil que captemos en que punto hay un quiebre
Mensajes: 44
Temas: 7
Registro en: May 2014
Reputación:
0
Absolutamente ningún log y se cierra.
Código PHP: public mysql_init() { stop_save = 0 new szError[256], iError SqlTpl = SQL_MakeDbTuple(MYSQL_HOST, MYSQL_USER, MYSQL_PASS, MYSQL_DB); g_Mysql = SQL_Connect(SqlTpl, iError, szError, sizeof ( szError ) - 1) if(!g_Mysql) { server_cmd("sv_password dboff") server_print("%s", szError) set_fail_state("[ZP] ERROR EN LA BASE DE DATOS") } else server_cmd("sv_password ^"^"") //set_task(300.0, "savedata") }
// Create Account public clcmd_create(id) { new Handle:User = SQL_PrepareQuery( g_Mysql, "SELECT `name` FROM `%s` WHERE `name` = '%s'", TABLE, g_playername[id]) SQL_Execute( User ) new szBuffer[ 33 ]; while (SQL_MoreResults(User)) { SQL_ReadResult( User, 0, szBuffer, sizeof ( szBuffer ) - 1 ) SQL_FreeHandle( User ) break; } if(equali(g_playername[id] , szBuffer)) { set_hudmessage(0, 255, 0, -1.0, -1.0, 0, 6.0, 20.0) show_hudmessage(id, "La Cuenta con la que deseas Registrarte ya esta en Uso^nPrueba con otra!!") show_menu_reg(id) return PLUGIN_HANDLED } else { client_cmd(id, "messagemode WRITE_PASSWORD") set_hudmessage(0, 255, 0, 0.01, 0.04, 0, 6.0, 12.0) show_hudmessage(id, "Escribi un Contraseña para tu Cuenta") } return PLUGIN_CONTINUE }
// Create Password public clcmd_pass( id ) { read_args(g_iPassword, charsmax(g_iPassword)) remove_quotes(g_iPassword) trim(g_iPassword) if(equal(g_iPassword, "") || contain(g_iPassword, " ") != -1) { client_cmd(id, "messagemode WRITE_PASSWORD") return PLUGIN_HANDLED } copy(g_iPlayerPassword[ id ], charsmax(g_iPlayerPassword), g_iPassword) set_hudmessage(0, 255, 0, 0.01, 0.04, 0, 6.0, 12.0) show_hudmessage(id, "Volve a escribir la Contraseña") client_cmd(id, "messagemode CONFIRM_PASSWORD") return PLUGIN_HANDLED }
// Confirm Password public clcmd_comfirmpass( id ) { read_args(g_iPassword, charsmax(g_iPassword)) remove_quotes(g_iPassword) trim(g_iPassword) if(equal(g_iPassword, "") || contain(g_iPassword, " ") != -1) { set_hudmessage(0, 255, 0, 0.01, 0.04, 0, 6.0, 12.0) show_hudmessage(id, "La Contraseña no coincide con la Anterior^nIntenta denuevo") client_cmd(id, "messagemode WRITE_PASSWORD") return PLUGIN_HANDLED } copy(g_iPlayerCP[ id ], charsmax(g_iPlayerCP), g_iPassword) if(equal(g_iPlayerCP[ id ] , g_iPlayerPassword[ id ])) { set_hudmessage(0, 255, 0, -1.0, -1.0, 1, 6.0, 12.0) show_hudmessage(id, "Has sido Registrado correctamente!!") check(id) for(new i; i < 5; i++) client_print(id, print_chat, "Cuenta: %s | Contraseña: %s", g_playername[id], g_iPlayerCP[id]) CreateNewAccount(id) return PLUGIN_CONTINUE } else { set_hudmessage(0, 255, 0, 0.01, 0.04, 0, 6.0, 12.0) show_hudmessage(id, "La Contraseña no coincide con la Anterior^nIntenta denuevo") client_cmd(id, "messagemode WRITE_PASSWORD") return PLUGIN_HANDLED; } return PLUGIN_HANDLED }
CreateNewAccount( id ) { new Handle:User = SQL_PrepareQuery( g_Mysql, "SELECT `name` FROM `%s` WHERE `name` = '%s'", TABLE, g_playername[id] ) SQL_Execute( User ) new szBuffer[ 33 ]; while ( SQL_MoreResults( User ) ) { SQL_ReadResult( User, 0, szBuffer, sizeof ( szBuffer ) - 1 ) SQL_FreeHandle( User ) break } if(!equal(szBuffer, g_playername[id] )) { new Handle:Update = SQL_PrepareQuery( g_Mysql, "INSERT INTO `%s`(`name`, `pass`) VALUES ('%s','%s')", TABLE, g_playername[id], g_iPlayerPassword[id] ) SQL_Execute( Update ) SQL_FreeHandle( Update ) client_cmd(id, "setinfo ^"%s^" ^"%s^"", iFieldPass, g_iPlayerPassword[ id ]) g_iRegistred[ id ] = 1; g_iValidPass[ id ] = g_iPassword show_menu_ch( id ); } else { set_hudmessage(0, 255, 0, -1.0, -1.0, 0, 6.0, 20.0) show_hudmessage(id, "La Cuenta con la que deseas Registrarte ya esta en Uso^nPrueba con otra!!") client_cmd(id, "messagemode WRITE_PASSWORD") return PLUGIN_HANDLED } return PLUGIN_HANDLED }
/* ================================================================ [ Login Account ] ===============================================================*/ public clcmd_loginacc( id ) { new Handle:User = SQL_PrepareQuery( g_Mysql, "SELECT `name` FROM `%s` WHERE `name` = '%s'", TABLE, g_playername[id]) SQL_Execute( User ) new szBuffer[ 33 ]; while ( SQL_MoreResults( User ) ) { SQL_ReadResult( User, 0, szBuffer, sizeof ( szBuffer ) - 1 ) SQL_FreeHandle( User ) break } if( equal(g_playername[id] , szBuffer) ) { client_cmd(id, "messagemode LOGIN_PASSWORD") set_hudmessage(0, 255, 0, 0.01, 0.04, 0, 6.0, 12.0) show_hudmessage(id, "Ingresa la Contraseña de tu Cuenta") return PLUGIN_CONTINUE; } else { set_hudmessage(0, 255, 0, -1.0, -1.0, 0, 6.0, 15.0) show_hudmessage(id, "La Cuenta con la que deseas Ingresar no Existe!!") show_menu_reg(id) return PLUGIN_HANDLED; } return PLUGIN_HANDLED; }
public clcmd_loginpass( id ) { read_args(g_iPassword, charsmax(g_iPassword)) remove_quotes(g_iPassword) trim(g_iPassword) new Handle:Check = SQL_PrepareQuery( g_Mysql, "SELECT `pass` FROM `%s` WHERE `name` = '%s'", TABLE, g_playername[id]) SQL_Execute( Check ) new szBuffer[ 33 ]; while ( SQL_MoreResults( Check ) ) { SQL_ReadResult( Check, 0, szBuffer, sizeof ( szBuffer ) - 1 ) SQL_FreeHandle( Check ) break } if(equal(szBuffer , g_iPassword)) { LoadDatos(id) g_iRegistred[ id ] = 1; g_iValidPass[ id ] = szBuffer; set_user_info(id,"setinfo _sql",g_iValidPass[id]) show_menu_ch( id ) set_hudmessage(0, 255, 0, -1.0, -1.0, 0, 6.0, 1.0) show_hudmessage(id, "CARGANDO") return PLUGIN_HANDLED } else { set_hudmessage(0, 255, 0, 0.01, 0.04, 0, 6.0, 15.0) show_hudmessage(id, "La Contraseña no coincide con la Registrada^nIntenta denuevo") client_cmd(id, "messagemode LOGIN_PASSWORD") return PLUGIN_HANDLED } return PLUGIN_HANDLED }
y cuando guarda y carga datos:
Código PHP: SaveDatos(id) { if(g_ammopacks[id] <= 1 || g_level[id] == 0) return; static szQuery[400] new SZ_Data[512], SZ_Data1[512] formatex(SZ_Data, charsmax(SZ_Data), "%d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d", g_logros[id][3], g_logros[id][4], g_logros[id][5], g_logros[id][6], g_logros[id][7], g_logros[id][8], g_logros[id][9], g_logros[id][10], g_logros[id][11], g_logros[id][12], g_logros[id][13], g_logros[id][14], g_logros[id][15], g_logros[id][16], g_logros[id][17], g_logros[id][18]) formatex(SZ_Data1, charsmax(SZ_Data1), "%d %d %d %d", g_color[id][COLOR_NVG], g_color[id][COLOR_HUD], g_color[id][COLOR_FLARE], g_color[id][COLOR_LINTERNA]) formatex(szQuery, 399, "UPDATE `%s` SET `ammopacks` = '%d', `reset` = '%d', `puntos` = '%d', `vidaH` = '%d', `chalecoH` = '%d', `speedH` = '%d', `gravH` = '%d', `damageH` = '%d', `vidaZ` = '%d', `speedZ` = '%d', `gravZ` = '%d', `damageZ` = '%d', `colores` = '%s', `logros` = '%s' WHERE `name` = '%s'", TABLE, g_ammopacks[id], g_reset[id], g_puntos[id], g_vidaH[id], g_chalecoH[id], g_speedH[id], g_grav_levelH[id], g_damage_levelH[id], g_vidaZ[id], g_speedZ[id], g_grav_levelZ[id], g_damage_levelZ[id], SZ_Data1, SZ_Data, g_playername[id]); SQL_ThreadQuery(SqlTpl, "QuerySetData", szQuery); }
LoadDatos(id) { static szQuery[400], iData[1]; formatex(szQuery, 399, "SELECT `ammopacks`, `reset`, `puntos`, `vidaH`, `chalecoH`, `speedH`, `gravH`, `damageH`, `vidaZ`, `speedZ`, `gravZ`, `damageZ`, `colores`, `logros` FROM `%s` WHERE ( `name` = '%s' );", TABLE, g_playername[id]); iData[0] = id; SQL_ThreadQuery(SqlTpl, "QuerySelectData", szQuery, iData, 1); }
public QuerySelectData( iFailState, Handle:hQuery, szError[ ], iError, iData[ ], iDataSize, Float:fQueueTime ) { if( iFailState == TQUERY_CONNECT_FAILED || iFailState == TQUERY_QUERY_FAILED ) { log_amx( "%s", szError ); return; } else { new id = iData[ 0 ]; new logro_[100], colores_[33] new ColAmmopacks = SQL_FieldNameToNum(hQuery, "ammopacks") new ColReset = SQL_FieldNameToNum(hQuery, "reset") new ColPuntos = SQL_FieldNameToNum(hQuery, "puntos") new ColVidaH = SQL_FieldNameToNum(hQuery, "vidaH") new ColChalecoH = SQL_FieldNameToNum(hQuery, "chalecoH") new ColSpeedH = SQL_FieldNameToNum(hQuery, "speedH") new ColGravH = SQL_FieldNameToNum(hQuery, "gravH") new ColDamageH = SQL_FieldNameToNum(hQuery, "damageH") new ColVidaZ = SQL_FieldNameToNum(hQuery, "vidaZ") new ColSpeedZ = SQL_FieldNameToNum(hQuery, "speedZ") new ColGravZ = SQL_FieldNameToNum(hQuery, "gravZ") new ColDamageZ = SQL_FieldNameToNum(hQuery, "damageZ") new ColColores = SQL_FieldNameToNum(hQuery, "colores") new ColLogro = SQL_FieldNameToNum(hQuery, "logros") while (SQL_MoreResults(hQuery)) { g_ammopacks[id] = SQL_ReadResult(hQuery, ColAmmopacks); g_reset[id] = SQL_ReadResult(hQuery, ColReset); g_puntos[id] = SQL_ReadResult(hQuery, ColPuntos); g_vidaH[id] = SQL_ReadResult(hQuery, ColVidaH); g_chalecoH[id] = SQL_ReadResult(hQuery, ColChalecoH); g_speedH[id] = SQL_ReadResult(hQuery, ColSpeedH); g_grav_levelH[id] = SQL_ReadResult(hQuery, ColGravH); g_damage_levelH[id] = SQL_ReadResult(hQuery, ColDamageH); g_vidaZ[id] = SQL_ReadResult(hQuery, ColVidaZ); g_speedZ[id] = SQL_ReadResult(hQuery, ColSpeedZ); g_grav_levelZ[id] = SQL_ReadResult(hQuery, ColGravZ) g_damage_levelZ[id] = SQL_ReadResult(hQuery, ColDamageZ); SQL_ReadResult(hQuery, ColColores, colores_, charsmax(colores_)); SQL_ReadResult(hQuery, ColLogro, logro_, charsmax(logro_)); SQL_NextRow(hQuery) } new logros[16], colores[4] str_to_arraynum(logro_, logros, 15) str_to_arraynum(colores_, colores, 3) for(new i = 0; i <= 15; i++) g_logros[id][i+3] = logros[i] for(new l = 0; l <= 3; l++) g_color[id][COLOR_NVG+l] = colores[l] check(id) } }
public QuerySetData( iFailState, Handle:hQuery, szError[ ], iError, iData[ ], iDataSize, Float:fQueueTime ) { if( iFailState == TQUERY_CONNECT_FAILED || iFailState == TQUERY_QUERY_FAILED ) { log_amx( "%s", szError ); return; } }
Mensajes: 3,466
Temas: 18
Registro en: Oct 2013
Reputación:
54
No sirve el codigo que diste. Por como indicas el error no es de la MySQL. La DB no es capaz de tirar un server con consultas simples, y dudo que alcanse a ejecutarse alguna debido a que se cierra inesperadamente el proceso. Algo debe estar pasando despues de mysql_init, haz debug, guarda textos en logs, investiga el code. Es lo que puedo decir si no pasas code
Mensajes: 44
Temas: 7
Registro en: May 2014
Reputación:
0
(02/01/2015, 11:41 PM)meTaLiCroSS escribió: No sirve el codigo que diste. Por como indicas el error no es de la MySQL. La DB no es capaz de tirar un server con consultas simples, y dudo que alcanse a ejecutarse alguna debido a que se cierra inesperadamente el proceso. Algo debe estar pasando despues de mysql_init, haz debug, guarda textos en logs, investiga el code. Es lo que puedo decir si no pasas code
Y pero si no es la mysql porque si desactivo el wamp si arranca..
que parte en especial necesitas?
Mensajes: 3,466
Temas: 18
Registro en: Oct 2013
Reputación:
54
02/01/2015, 11:52 PM
(Última modificación: 02/01/2015, 11:52 PM por meTaLiCroSS.)
(02/01/2015, 11:43 PM)ilhianois escribió: (02/01/2015, 11:41 PM)meTaLiCroSS escribió: No sirve el codigo que diste. Por como indicas el error no es de la MySQL. La DB no es capaz de tirar un server con consultas simples, y dudo que alcanse a ejecutarse alguna debido a que se cierra inesperadamente el proceso. Algo debe estar pasando despues de mysql_init, haz debug, guarda textos en logs, investiga el code. Es lo que puedo decir si no pasas code
Y pero si no es la mysql porque si desactivo el wamp si arranca..
que parte en especial necesitas?
Y es obvio que si desactivas el WAMP arrancara debido a que "set_fail_state" cortará el proceso del plugin y no se seguira ejecutando nada en el caso de no encontrarse una conexion valida.
No sabria decirte magicamente que parte en especial necesito por que no se como esta estructurado tu plugin. No hay mil ojos que busquen tu plugin, ni nada innovador a estas fechas que sea tan privado tu plugin.
Y habilita PM si me envias y esperes que te responda :p
Mensajes: 44
Temas: 7
Registro en: May 2014
Reputación:
0
(02/01/2015, 11:52 PM)meTaLiCroSS escribió: (02/01/2015, 11:43 PM)ilhianois escribió: (02/01/2015, 11:41 PM)meTaLiCroSS escribió: No sirve el codigo que diste. Por como indicas el error no es de la MySQL. La DB no es capaz de tirar un server con consultas simples, y dudo que alcanse a ejecutarse alguna debido a que se cierra inesperadamente el proceso. Algo debe estar pasando despues de mysql_init, haz debug, guarda textos en logs, investiga el code. Es lo que puedo decir si no pasas code
Y pero si no es la mysql porque si desactivo el wamp si arranca..
que parte en especial necesitas?
Y es obvio que si desactivas el WAMP arrancara debido a que "set_fail_state" cortará el proceso del plugin y no se seguira ejecutando nada en el caso de no encontrarse una conexion valida.
No sabria decirte magicamente que parte en especial necesito por que no se como esta estructurado tu plugin. No hay mil ojos que busquen tu plugin, ni nada innovador a estas fechas que sea tan privado tu plugin.
Y habilita PM si me envias y esperes que te responda :p
Claro tenes razón totalmente.
Ahí habilité.
Mensajes: 44
Temas: 7
Registro en: May 2014
Reputación:
0
Bumpeo a pedido de metalicross.
Le pase el code, lo leyo, esta todo bien.
El modules .ini perfecto, los models estan, todo está.
log CON ZP Y WAMP:
Código PHP: Console initialized. Base networking initialized. "sv_cheats" changed to "1" Initializing deltas Protocol version 48 Exe version 1.1.2.7 (cstrike) Exe build: 13:13:28 Aug 29 2013 (6153) 40.0 Mb heap execing valve.rc execing language.cfg execing autoexec.cfg execing violence.cfg Server IP address 192.168.1.100:27015
Adding: cstrike/addons\metamod\dlls\metamod.dll Metamod version 1.21.1-am Copyright (c) 2001-2013 Will Day <willday@metamod.org> Metamod comes with ABSOLUTELY NO WARRANTY; for details type `meta gpl'. This is free software, and you are welcome to redistribute it under certain conditions; type `meta gpl' for details. Version 0.9.391 Windows
AMX Mod X version 1.8.2 Copyright (c) 2004-2006 AMX Mod X Development Team AMX Mod X comes with ABSOLUTELY NO WARRANTY; for details type `amxx gpl'. This is free software and you are welcome to redistribute it under certain conditions; type 'amxx gpl' for details. Dll loaded for mod Counter-Strike Spawn Server de_aztec Clearing memory Texture load: 0.5ms WARNING: failed to locate sequence file de_aztec Building PAS... Average leaves visible / audible / total: 103 / 294 / 800 L 01/03/2015 - 00:48:05: -------- Mapchange to de_aztec -------- "amxmodx_version" changed to "1.8.2"
CON ZP SIN WAMP:
Código PHP: Console initialized. Base networking initialized. "sv_cheats" changed to "1" Initializing deltas Protocol version 48 Exe version 1.1.2.7 (cstrike) Exe build: 13:13:28 Aug 29 2013 (6153) 40.0 Mb heap execing valve.rc execing language.cfg execing autoexec.cfg execing violence.cfg Server IP address 192.168.1.100:27015
Adding: cstrike/addons\metamod\dlls\metamod.dll Metamod version 1.21.1-am Copyright (c) 2001-2013 Will Day <willday@metamod.org> Metamod comes with ABSOLUTELY NO WARRANTY; for details type `meta gpl'. This is free software, and you are welcome to redistribute it under certain conditions; type `meta gpl' for details. Version 0.9.391 Windows
AMX Mod X version 1.8.2 Copyright (c) 2004-2006 AMX Mod X Development Team AMX Mod X comes with ABSOLUTELY NO WARRANTY; for details type `amxx gpl'. This is free software and you are welcome to redistribute it under certain conditions; type 'amxx gpl' for details. Dll loaded for mod Counter-Strike Spawn Server de_aztec Clearing memory Texture load: 0.4ms WARNING: failed to locate sequence file de_aztec Building PAS... Average leaves visible / audible / total: 103 / 294 / 800 L 01/03/2015 - 00:49:48: -------- Mapchange to de_aztec -------- "amxmodx_version" changed to "1.8.2" Can't connect to MySQL server on '127.0.0.1' (10061) L 01/03/2015 - 00:49:49: [AMXX] Plugin ("zpp.amxx") is setting itself as failed. L 01/03/2015 - 00:49:49: [AMXX] Plugin says: [ZPFB] ERROR EN LA BASE DE DATOS L 01/03/2015 - 00:49:49: [AMXX] Run time error 1 (plugin "zpp.amxx") - forced exit "sv_maxspeed" changed to "900" Cvar_Set: variable room_type not found "sv_password" changed to "***PROTECTED***"
GAME SKILL LEVEL:1 Cvar_Set: variable cl_himodels not found "pausable" changed to "0" 0 entities inhibited [AMXX] Loaded 1 admin from file "amx_language" changed to "en" "amx_client_languages" changed to "1" "amx_nextmap" changed to "de_airstrip" "sv_accelerate" changed to "5" "sv_stopspeed" changed to "75" 24 player server started execing addons/amxmodx/configs/amxx.cfg Executing AMX Mod X Configuration File Scrolling message displaying frequency: 10:00 minutes execing addons/amxmodx/configs/sql.cfg execing addons/amxmodx/configs/custommenuitems.cfg Sys_InitializeGameDLL called twice, skipping second call execing config.cfg Server logging data to file logs\L0103002.log L 01/03/2015 - 00:49:50: Log file started (file "logs\L0103002.log") (game "cstrike") (version "48/1.1.2.7/6153") execing server.cfg L 01/03/2015 - 00:49:50: Server cvar "sv_aim" = "0" "sv_aim" changed to "0" L 01/03/2015 - 00:49:50: Server cvar "sv_maxspeed" = "320" "sv_maxspeed" changed to "320" L 01/03/2015 - 00:49:50: Server cvar "mp_timelimit" = "20" "mp_timelimit" changed to "20" L 01/03/2015 - 00:49:50: Server cvar "sv_cheats" = "0" "sv_cheats" changed to "0" couldn't exec listip.cfg couldn't exec banned.cfg Menu item 17 added to Menus Front-End: "Plugin Cvars" from plugin "pluginmenu.amxx" Menu item 18 added to Menus Front-End: "Plugin Commands" from plugin "pluginmenu.amxx" Connection to Steam servers successful. VAC secure mode is activated.
SIN ZP:
Código PHP: Console initialized. Base networking initialized. "sv_cheats" changed to "1" Initializing deltas Protocol version 48 Exe version 1.1.2.7 (cstrike) Exe build: 13:13:28 Aug 29 2013 (6153) 40.0 Mb heap execing valve.rc execing language.cfg execing autoexec.cfg execing violence.cfg WARNING: UDP_OpenSocket: port: 27015 bind: WSAEADDRINUSE
Mensajes: 2,571
Temas: 40
Registro en: Feb 2014
Reputación:
72
Si metalicross no te pudo ayudar sin el code, los demás tampoco postéalo para que podamos ayudarte.
Mensajes: 3,466
Temas: 18
Registro en: Oct 2013
Reputación:
54
Alguna verga rara hay entre precache e init. Utiliza server_print en muchos puntos entre esas 3 funciones y con condebug vas revisando hasta que punto llegan los mensajes, para ver la posible ultima funcion que se ejecuta antes que se caiga.
Mensajes: 44
Temas: 7
Registro en: May 2014
Reputación:
0
03/01/2015, 04:30 PM
(Última modificación: 03/01/2015, 04:32 PM por ilhianois.)
Estuve probando lo del server_print y llegué a esto:
Código PHP: // Allow registering stuff now g_arrays_created = true // Load customization data load_customization_from_files() new i, buffer[100] // Load up the hard coded extra items native_register_extra_item2("NightVision", g_extra_costs2[EXTRA_NVISION], ZP_TEAM_HUMAN) native_register_extra_item2("T-Virus Antidote", g_extra_costs2[EXTRA_ANTIDOTE], ZP_TEAM_ZOMBIE) native_register_extra_item2("Zombie Madness", g_extra_costs2[EXTRA_MADNESS], ZP_TEAM_ZOMBIE) native_register_extra_item2("Infection Bomb", g_extra_costs2[EXTRA_INFBOMB], ZP_TEAM_ZOMBIE)
// Extra weapons for (i = 0; i < ArraySize(g_extraweapon_names); i++) { ArrayGetString(g_extraweapon_names, i, buffer, charsmax(buffer)) native_register_extra_item2(buffer, ArrayGetCell(g_extraweapon_costs, i), ZP_TEAM_HUMAN) }
// SI PONGO EL SERVER_PRINT ACÁ, ME LO LLEGA A ESCRIBIR EN EL qconsole.log
// Custom player models for (i = 0; i < ArraySize(model_nemesis); i++) { ArrayGetString(model_nemesis, i, buffer, charsmax(buffer)) format(buffer, charsmax(buffer), "models/player/%s/%s.mdl", buffer, buffer) ArrayPushCell(g_modelindex_nemesis, precache_model(buffer)) if (g_force_consistency == 1) force_unmodified(force_model_samebounds, {0,0,0}, {0,0,0}, buffer) if (g_force_consistency == 2) force_unmodified(force_exactfile, {0,0,0}, {0,0,0}, buffer) }
// SI LO PONGO ACÁ, YA NO LLEGA A ESCRIBIR EL qconsole.log
for (i = 0; i < ArraySize(model_survivor); i++) { ArrayGetString(model_survivor, i, buffer, charsmax(buffer)) format(buffer, charsmax(buffer), "models/player/%s/%s.mdl", buffer, buffer) ArrayPushCell(g_modelindex_survivor, precache_model(buffer)) if (g_force_consistency == 1) force_unmodified(force_model_samebounds, {0,0,0}, {0,0,0}, buffer) if (g_force_consistency == 2) force_unmodified(force_exactfile, {0,0,0}, {0,0,0}, buffer) } for (i = 0; i < ArraySize(model_sniper); i++) { ArrayGetString(model_sniper, i, buffer, charsmax(buffer)) format(buffer, charsmax(buffer), "models/player/%s/%s.mdl", buffer, buffer) ArrayPushCell(g_modelindex_sniper, precache_model(buffer)) if (g_force_consistency == 1) force_unmodified(force_model_samebounds, {0,0,0}, {0,0,0}, buffer) if (g_force_consistency == 2) force_unmodified(force_exactfile, {0,0,0}, {0,0,0}, buffer) } for (i = 0; i < ArraySize(model_ninja); i++) { ArrayGetString(model_ninja, i, buffer, charsmax(buffer)) format(buffer, charsmax(buffer), "models/player/%s/%s.mdl", buffer, buffer) ArrayPushCell(g_modelindex_ninja, precache_model(buffer)) if (g_force_consistency == 1) force_unmodified(force_model_samebounds, {0,0,0}, {0,0,0}, buffer) if (g_force_consistency == 2) force_unmodified(force_exactfile, {0,0,0}, {0,0,0}, buffer) } for (i = 0; i < ArraySize(model_executioner); i++) { ArrayGetString(model_executioner, i, buffer, charsmax(buffer)) format(buffer, charsmax(buffer), "models/player/%s/%s.mdl", buffer, buffer) ArrayPushCell(g_modelindex_executioner, precache_model(buffer)) if (g_force_consistency == 1) force_unmodified(force_model_samebounds, {0,0,0}, {0,0,0}, buffer) if (g_force_consistency == 2) force_unmodified(force_exactfile, {0,0,0}, {0,0,0}, buffer) } for (i = 0; i < ArraySize(model_alienboss); i++) { ArrayGetString(model_alienboss, i, buffer, charsmax(buffer)) format(buffer, charsmax(buffer), "models/player/%s/%s.mdl", buffer, buffer) ArrayPushCell(g_modelindex_alienboss, precache_model(buffer)) if (g_force_consistency == 1) force_unmodified(force_model_samebounds, {0,0,0}, {0,0,0}, buffer) if (g_force_consistency == 2) force_unmodified(force_exactfile, {0,0,0}, {0,0,0}, buffer) } for (i = 0; i < ArraySize(model_alienjunior); i++) { ArrayGetString(model_alienjunior, i, buffer, charsmax(buffer)) format(buffer, charsmax(buffer), "models/player/%s/%s.mdl", buffer, buffer) ArrayPushCell(g_modelindex_alienjunior, precache_model(buffer)) if (g_force_consistency == 1) force_unmodified(force_model_samebounds, {0,0,0}, {0,0,0}, buffer) if (g_force_consistency == 2) force_unmodified(force_exactfile, {0,0,0}, {0,0,0}, buffer) } for (i = 0; i < ArraySize(model_admin_zombie); i++) { ArrayGetString(model_admin_zombie, i, buffer, charsmax(buffer)) format(buffer, charsmax(buffer), "models/player/%s/%s.mdl", buffer, buffer) ArrayPushCell(g_modelindex_admin_zombie, precache_model(buffer)) if (g_force_consistency == 1) force_unmodified(force_model_samebounds, {0,0,0}, {0,0,0}, buffer) if (g_force_consistency == 2) force_unmodified(force_exactfile, {0,0,0}, {0,0,0}, buffer) } for (i = 0; i < ArraySize(model_admin_human); i++) { ArrayGetString(model_admin_human, i, buffer, charsmax(buffer)) format(buffer, charsmax(buffer), "models/player/%s/%s.mdl", buffer, buffer) ArrayPushCell(g_modelindex_admin_human, precache_model(buffer)) if (g_force_consistency == 1) force_unmodified(force_model_samebounds, {0,0,0}, {0,0,0}, buffer) if (g_force_consistency == 2) force_unmodified(force_exactfile, {0,0,0}, {0,0,0}, buffer) }
Tengo así el customization file:
Código PHP: [Player Models] (randomly chosen if more than one) ALIEN_BOSS = AlienBoss2 ALIEN_JUNIOR = AlienJunior NEMESIS = nemesis2 SNIPER = Sniper NINJA = ninja EXECUTIONER = executioner SURVIVOR = survi2 ADMIN ZOMBIE = zombie_source ADMIN HUMAN = arctic
Será que en vez de AlienBoss2, AlienJunior, y étc debería poner la ruta al model?
Mensajes: 3,466
Temas: 18
Registro en: Oct 2013
Reputación:
54
Pon prints dentro del loop que esta cortando el proceso
Mensajes: 44
Temas: 7
Registro en: May 2014
Reputación:
0
03/01/2015, 04:38 PM
(Última modificación: 03/01/2015, 04:38 PM por ilhianois.)
Acá estamo:
Código PHP: for (i = 0; i < ArraySize(model_nemesis); i++) { ArrayGetString(model_nemesis, i, buffer, charsmax(buffer)) format(buffer, charsmax(buffer), "models/player/%s/%s.mdl", buffer, buffer) ArrayPushCell(g_modelindex_nemesis, precache_model(buffer)) // SI LO PONGO ANTES DE ESTA LINEA, LO ESCRIBE. DESPUÉS, YA NO. if (g_force_consistency == 1) force_unmodified(force_model_samebounds, {0,0,0}, {0,0,0}, buffer) if (g_force_consistency == 2) force_unmodified(force_exactfile, {0,0,0}, {0,0,0}, buffer) }
Mensajes: 3,466
Temas: 18
Registro en: Oct 2013
Reputación:
54
Haz print de la variable "buffer" antes de la linea que verificaste.
Mensajes: 44
Temas: 7
Registro en: May 2014
Reputación:
0
Lo hice y este es el qconsole:
Código PHP: Console initialized. Base networking initialized. "sv_cheats" changed to "1" Initializing deltas Protocol version 48 Exe version 1.1.2.7 (cstrike) Exe build: 13:13:28 Aug 29 2013 (6153) 40.0 Mb heap execing valve.rc execing language.cfg execing autoexec.cfg execing violence.cfg Server IP address 192.168.1.100:27015
Adding: cstrike/addons\metamod\dlls\metamod.dll Metamod version 1.21.1-am Copyright (c) 2001-2013 Will Day <willday@metamod.org> Metamod comes with ABSOLUTELY NO WARRANTY; for details type `meta gpl'. This is free software, and you are welcome to redistribute it under certain conditions; type `meta gpl' for details. Version 0.9.391 Windows
AMX Mod X version 1.8.2 Copyright (c) 2004-2006 AMX Mod X Development Team AMX Mod X comes with ABSOLUTELY NO WARRANTY; for details type `amxx gpl'. This is free software and you are welcome to redistribute it under certain conditions; type 'amxx gpl' for details. Dll loaded for mod Counter-Strike Spawn Server de_aztec Clearing memory Texture load: 0.4ms WARNING: failed to locate sequence file de_aztec Building PAS... Average leaves visible / audible / total: 103 / 294 / 800 L 01/03/2015 - 16:46:22: -------- Mapchange to de_aztec -------- "amxmodx_version" changed to "1.8.2" models/player/nemesis2/nemesis2.mdl
|