Raised This Month: $ Target: $400
 0% 

Error:Failed to load dialog file Resource/UI/ClassMenu.res


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Swedish Chef
Junior Member
Join Date: Sep 2006
Old 09-28-2006 , 20:22   Error:Failed to load dialog file Resource/UI/ClassMenu.res
Reply With Quote #1

hello everyone,

sry for any inconvinience in advance, but im having a problem with an idea i came up with:
I changed the "brass knuckles" plugin so that it would work with another "knife skin" called "kung fu". Everything worked fine until alot of the people that tries to connect to my server get disconnected and their CS quits! I noticed this only after Counter-Strikes update 2 or 3 weeks ago, im not sure that it's related tho...

here's the original code for the plugin:
Code:
#include <amxmodx>
#include <fakemeta>
#include <engine>
#include <cstrike>

new PLUGIN_NAME[] =    "Brass Knuckles"
new PLUGIN_VERSION[] =     "1.0"
new PLUGIN_AUTHOR[] =    "Cheap_Suit"

public plugin_init() 
{
    register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR)
    register_event("CurWeapon", "Event_CurWeapon", "be", "1=1")
    register_event("Damage", "Event_Damage", "be", "2!0")
    register_forward(FM_EmitSound, "EmitSound")
}

public plugin_precache()
{
    precache_model("models/p_bknuckles.mdl")
    precache_model("models/v_bknuckles.mdl")
    precache_sound("bknuckles/knife_hit1.wav")
    precache_sound("bknuckles/knife_hit2.wav")
    precache_sound("bknuckles/knife_hit3.wav")
    precache_sound("bknuckles/knife_hit4.wav")
    precache_sound("bknuckles/knife_stab.wav")
}

public Event_Damage(id)
{
    if(!is_user_alive(id) || !is_user_connected(id)) 
        return PLUGIN_CONTINUE
    
    new AttakerWeapon, AttakerPartHit
    get_user_attacker(id, AttakerWeapon, AttakerPartHit)
    
    if(AttakerWeapon != CSW_KNIFE)
        return PLUGIN_CONTINUE
    
    new Float:Random_Float[3]
    for(new i = 0; i < 3; i++) Random_Float[i] = random_float(100.0, 150.0)
    Punch_View(id, Random_Float)
    
    return PLUGIN_CONTINUE
}

public Event_CurWeapon(id)
{
    if(!is_user_alive(id) || !is_user_connected(id)) 
        return PLUGIN_CONTINUE
    
    new temp[2], weapon = get_user_weapon(id, temp[0], temp[1])
    if(weapon == CSW_KNIFE)
    {
        entity_set_string(id, EV_SZ_viewmodel, "models/v_bknuckles.mdl")
        entity_set_string(id, EV_SZ_weaponmodel, "models/p_bknuckles.mdl")
    }
    return PLUGIN_CONTINUE
}

public EmitSound(id, channel, sample[])
{
    if(!is_user_alive(id) || !is_user_connected(id)) 
        return FMRES_IGNORED
    
    new temp[2], weapon = get_user_weapon(id, temp[0], temp[1])
    if(weapon == CSW_KNIFE)
    {
        if(equal(sample,"weapons/knife_hit1.wav")) 
        {
            emit_sound(id, CHAN_WEAPON, "bknuckles/knife_hit1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
            return FMRES_SUPERCEDE
        }
        else if(equal(sample,"weapons/knife_hit2.wav")) 
        {
            emit_sound(id, CHAN_WEAPON, "bknuckles/knife_hit2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)    
            return FMRES_SUPERCEDE
        }
        else if(equal(sample,"weapons/knife_hit3.wav")) 
        {
            emit_sound(id, CHAN_WEAPON, "bknuckles/knife_hit3.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)    
            return FMRES_SUPERCEDE
        }
        else if(equal(sample,"weapons/knife_hit4.wav")) 
        {
            emit_sound(id, CHAN_WEAPON, "bknuckles/knife_hit4.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
            return FMRES_SUPERCEDE
        }
        else if(equal(sample,"weapons/knife_stab.wav")) 
        {
            emit_sound(id, CHAN_WEAPON, "bknuckles/knife_stab.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)    
            return FMRES_SUPERCEDE
        }
    }
    return FMRES_IGNORED
}

stock Punch_View(id, Float:ViewAngle[3])
{
    entity_set_vector(id, EV_VEC_punchangle, ViewAngle)
}
Here's the plugin after i changed it:
Code:
#include <amxmodx>
#include <fakemeta>
#include <engine>
#include <cstrike>

new PLUGIN_NAME[] =   
new PLUGIN_VERSION[] = 
new PLUGIN_AUTHOR[] =    

public plugin_init() 
{
    register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR)
    register_event("CurWeapon", "Event_CurWeapon", "be", "1=1")
    register_event("Damage", "Event_Damage", "be", "2!0")
    register_forward(FM_EmitSound, "EmitSound")
}

public plugin_precache()
{
    precache_model("models/v_tgf_kungfu.mdl")
    precache_model("models/p_tgf_kungfu.mdl")
    precache_sound("tgf/tgf_hit1.wav")
    precache_sound("tgf/tgf_hit2.wav")
    precache_sound("tgf/tgf_hit3.wav")
    precache_sound("tgf/tgf_hit4.wav")
    precache_sound("tgf/tgf_deploy1.wav")
    precache_sound("tgf/tgf_hitwall1.wav")
    precache_sound("tgf/tgf_slash1.wav")
    precache_sound("tgf/tgf_slash2.wav")
    precache_sound("tgf/tgf_stab.wav")
}

public Event_Damage(id)
{
    if(!is_user_alive(id) || !is_user_connected(id)) 
        return PLUGIN_CONTINUE
    
    new AttakerWeapon, AttakerPartHit
    get_user_attacker(id, AttakerWeapon, AttakerPartHit)
    
    if(AttakerWeapon != CSW_KNIFE)
        return PLUGIN_CONTINUE
    
    new Float:Random_Float[3]
    for(new i = 0; i < 3; i++) Random_Float[i] = random_float(100.0, 150.0)
    Punch_View(id, Random_Float)
    
    return PLUGIN_CONTINUE
}

public Event_CurWeapon(id)
{
    if(!is_user_alive(id) || !is_user_connected(id)) 
        return PLUGIN_CONTINUE
    
    new temp[2], weapon = get_user_weapon(id, temp[0], temp[1])
    if(weapon == CSW_KNIFE)
    {
        entity_set_string(id, EV_SZ_viewmodel, "models/v_tgf_kungfu.mdl")
        entity_set_string(id, EV_SZ_weaponmodel, "models/p_tgf_kungfu.mdl")
    }
    return PLUGIN_CONTINUE
}

public EmitSound(id, channel, sample[])
{
    if(!is_user_alive(id) || !is_user_connected(id)) 
        return FMRES_IGNORED
    
    new temp[2], weapon = get_user_weapon(id, temp[0], temp[1])
    if(weapon == CSW_KNIFE)
    {
        if(equal(sample,"weapons/knife_hit1.wav")) 
        {
            emit_sound(id, CHAN_WEAPON, "tgf/tgf_hit1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
            return FMRES_SUPERCEDE
        }
        else if(equal(sample,"weapons/knife_hit2.wav")) 
        {
            emit_sound(id, CHAN_WEAPON, "tgf/tgf_hit2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)    
            return FMRES_SUPERCEDE
        }
        else if(equal(sample,"weapons/knife_hit3.wav")) 
        {
            emit_sound(id, CHAN_WEAPON, "tgf/tgf_hit3.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)    
            return FMRES_SUPERCEDE
        }
        else if(equal(sample,"weapons/knife_hit4.wav")) 
        {
            emit_sound(id, CHAN_WEAPON, "tgf/tgf_hit4.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
            return FMRES_SUPERCEDE
        }
        else if(equal(sample,"weapons/knife_stab.wav")) 
        {
            emit_sound(id, CHAN_WEAPON, "tgf/tgf_stab.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)    
            return FMRES_SUPERCEDE
        }
        else if(equal(sample,"weapons/knife_deploy1.wav")) 
        {
            emit_sound(id, CHAN_WEAPON, "tgf/tgf_deploy1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)    
            return FMRES_SUPERCEDE
        }
        else if(equal(sample,"weapons/knife_hitwall1.wav")) 
        {
            emit_sound(id, CHAN_WEAPON, "tgf/tgf_hitwall1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)    
            return FMRES_SUPERCEDE
        }
        else if(equal(sample,"weapons/knife_slash1.wav")) 
        {
            emit_sound(id, CHAN_WEAPON, "tgf/tgf_slash1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)    
            return FMRES_SUPERCEDE
        }
        else if(equal(sample,"weapons/knife_slash2.wav")) 
        {
            emit_sound(id, CHAN_WEAPON, "tgf/tgf_slash2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)    
            return FMRES_SUPERCEDE
        }
    }
    return FMRES_IGNORED
}

stock Punch_View(id, Float:ViewAngle[3])
{
    entity_set_vector(id, EV_VEC_punchangle, ViewAngle)
}
all sounds and models are in the right folders and the necessary modules are enabled.

The error logged in CS when people get disconnected/CS quits is
Code:
Error:Failed to load dialog file Resource/UI/ClassMenu.res


Function trace:
CFileSystem_Steam::Mount()
Thank you for any help provided in advance.
Sorry if the code is not written properly, but its the first time i've done anything like this...

Last edited by Swedish Chef; 09-29-2006 at 15:04. Reason: better title
Swedish Chef is offline
Swedish Chef
Junior Member
Join Date: Sep 2006
Old 09-30-2006 , 04:15   Re: Error:Failed to load dialog file Resource/UI/ClassMenu.res
Reply With Quote #2

*bump*
Swedish Chef is offline
p3tsin
Senior Member
Join Date: Sep 2005
Location: Finland
Old 09-30-2006 , 06:20   Re: Error:Failed to load dialog file Resource/UI/ClassMenu.res
Reply With Quote #3

i dont know whats causing that problem but i can tell u its not the classmenu.res

http://support.steampowered.com/cgi-...er/std_alp.php -> search text: 131, search by: answer id

Quote:
Originally Posted by steamsupport
This is NOT an indication of a real error and it happens if you have a problem running your game or not.

Only TeamFortress has this file for real and no other game needs it, but for some reason when you run some (not all) of the Steam games, HL will go looking for this file and will create this message in the errorlogs if it can't find it.
i tried to look over the code but didnt find anything that would cause it
could it be some other plugin?
__________________
plop
p3tsin is offline
Swedish Chef
Junior Member
Join Date: Sep 2006
Old 09-30-2006 , 10:20   Re: Error:Failed to load dialog file Resource/UI/ClassMenu.res
Reply With Quote #4

thanks for the reply!

not really, i've turned off/uninstall all other plugins and just let this one run and always the same problem. Sometimes i have my server full (20/20) and i just turn the plugin on, change the map and i end up with 5 people in the server with no problems and 10/15 messages on friends from people that cant get in.

I've heard that other servers have the save problem, mostly servers that have model mods on them... dont know if its true or not.

Could it be something related with the latest CS updates and models precache?...
Swedish Chef is offline
Swedish Chef
Junior Member
Join Date: Sep 2006
Old 10-08-2006 , 20:42   Re: Error:Failed to load dialog file Resource/UI/ClassMenu.res
Reply With Quote #5

since i havent had any replies, im guessing that the code of the plugin is correct, right?...
Swedish Chef is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:48.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode