Hello.
I am using Prokreedz 2.27 [
http://forums.alliedmods.net/showthread.php?t=130417 ] , but something is causing my server to crash when user clicks start button on "kz" maps. Could someone take a look at it?
This is the part of timersystem, which could be causing it. Maybe someone has any idea what to change there so it doesnt crash it? By crashing it I actually mean, that the servers sets itself in some kind of infinite loop and after a while crashes.
BTW: The server is not crashing on my LAN server (Windows XP) , but it crashes on public server which is running on Linux.
Code:
public fwdUse(ent, id)
{
if( !ent || id > 32 )
{
return HAM_IGNORED;
}
if( !is_user_alive(id) )
{
return HAM_IGNORED;
}
new name[32]
get_user_name(id, name, 31)
new szTarget[ 32 ];
pev(ent, pev_target, szTarget, 31);
if( TrieKeyExists( g_tStarts, szTarget ) )
{
if ( get_gametime() - antihookcheat[id] < 3.0 )
{
kz_hud_message( id, "Wait 3 seconds after using hook" );
return PLUGIN_HANDLED
}
if ( reset_checkpoints(id) && !timer_started[id] )
{
start_climb(id)
if(get_pcvar_num(kz_strip_other_weapons) == 1)
for(new i = 0; i < 8; i++)
if( user_has_weapon(id, other_weapons[i]) )
{
strip_user_weapons(id)
give_item(id,"weapon_knife")
give_item(id,"weapon_usp")
set_pdata_int(id, 382, 24, 5)
}
if( pev(id, pev_health) < 100 )
set_pev(id, pev_health, 100.0)
pev(id, pev_origin, SavedStart[id])
if(get_pcvar_num(kz_save_autostart) == 1)
AutoStart[id] = true;
if( !DefaultStart )
{
new mapname[64]
get_mapname( mapname, 63)
kz_set_start(mapname, SavedStart[id])
ColorChat(id, GREEN, "[XJ]^x01 Start position set for this map.")
}
remove_hook(id)
}
}
if( TrieKeyExists( g_tStops, szTarget ) )
{
if( timer_started[id] )
{
finish_climb(id)
if(get_pcvar_num(kz_hook_prize) == 1 && !canusehook[id])
{
canusehook[id] = true
ColorChat(id, GREEN, "[XJ]^x01 Hook has been enabled, bind any key '+hook' to use it.")
}
}
else
kz_hud_message(id, "You must press the start button first")
}
return HAM_IGNORED
}
And here is the full source -
http://pastebin.com/e1GD91GN
I would appreciate your help!
__________________