Raised This Month: $51 Target: $400
 12% 

[HELP] HLSDK making custom game C++


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ghosted
Veteran Member
Join Date: Apr 2015
Location: Georgia
Old 10-16-2016 , 05:54   [HELP] HLSDK making custom game C++
Reply With Quote #1

I Was Editing CHud member CHudBattery to CHudArmor in Entire Solution.
After that, in-game there wasnt Armor(Battery) displayed anymore, and not called any function from CHudArmor! (CHudBattery)
This means i cant add or change CHud elements?

Help
__________________

[MOD] CS Weapon Mod V1.7.1
[MM] MetaMod-C V1.0
[MOD] CS NPC Mod (5%)


Probably Left AM

Last edited by Ghosted; 10-16-2016 at 05:57.
Ghosted is offline
Solokiller
Senior Member
Join Date: Sep 2015
Old 10-16-2016 , 09:32   Re: [HELP] HLSDK making custom game C++
Reply With Quote #2

Enable the console and set developer to 2, then start a map and see if there are any errors. It's possible that you changed the name of a message function, causing the client to no longer receive battery state changes. If that's the case, it'll print an error in the console. You'll have to change this code:
Code:
gmsgBattery = REG_USER_MSG( "Battery", 2 );
to the new name of the message function on the client side.
CHudBattery has a method called MsgFunc_Battery, whatever you changed it to, change "Battery" to match the part after MsgFunc_.

If that's not the problem, then you'll have to see if any other errors are printed. Make sure there are no errors or warnings while compiling, and check if the code that hooks the hud element into the list of hud elements still works.
Solokiller 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 03:02.


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