![]() |
![]() ![]() |
![]() |
twistedeuphoria |
![]()
Post
#1
|
Newbie ![]() Group: Members Posts: 1 Joined: 24-June 09 Member No.: 1,586 ![]() |
Hello, I see you had trouble with getting "HandleCommand_JoinClass( undefined ) - invalid class name" spammed in console and was wondering how you fixed it. I'm getting the same thing with a sourcemod fake client plugin I'm playing with.
|
Cheeseh |
![]()
Post
#2
|
![]() Admin ![]() ![]() ![]() ![]() ![]() Group: Admin Posts: 3,066 Joined: 11-September 03 From: uk Member No.: 1 ![]() |
Hello, I see you had trouble with getting "HandleCommand_JoinClass( undefined ) - invalid class name" spammed in console and was wondering how you fixed it. I'm getting the same thing with a sourcemod fake client plugin I'm playing with. this was never really fixed as such. The only way to fix it was to get the bot to join a class and team. CODE void CBotFortress :: selectTeam () { char buffer[32]; int team = randomInt(1,2); sprintf(buffer,"jointeam %d",team); helpers->ClientCommand(m_pEdict,buffer); } void CBotFortress :: selectClass () { char buffer[32]; TF_Class _class; if ( m_iDesiredClass == 0 ) _class = (TF_Class)randomInt(1,9); else _class = (TF_Class)m_iDesiredClass; m_iClass = _class; if ( _class == TF_CLASS_SCOUT ) { sprintf(buffer,"joinclass scout"); } else if ( _class == TF_CLASS_ENGINEER ) { sprintf(buffer,"joinclass engineer"); } else if ( _class == TF_CLASS_DEMOMAN ) { sprintf(buffer,"joinclass demoman"); } else if ( _class == TF_CLASS_SOLDIER ) { sprintf(buffer,"joinclass soldier"); } else if ( _class == TF_CLASS_HWGUY ) { sprintf(buffer,"joinclass heavyweapons"); } else if ( _class == TF_CLASS_MEDIC ) { sprintf(buffer,"joinclass medic"); } else if ( _class == TF_CLASS_SPY ) { sprintf(buffer,"joinclass spy"); } else if ( _class == TF_CLASS_PYRO ) { sprintf(buffer,"joinclass pyro"); } else { sprintf(buffer,"joinclass sniper"); } helpers->ClientCommand(m_pEdict,buffer); } |
![]() ![]() |
![]() |
Lo-Fi Version | Time is now: 18th June 2025 - 05:47 PM |