Raised This Month: $64 Target: $400
 16% 

[HL2DM] SDKHooks OnGetGameDescription


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hazukiy
Member
Join Date: Jul 2009
Location: England
Old 07-21-2018 , 08:03   [HL2DM] SDKHooks OnGetGameDescription
Reply With Quote #1

So I've recently come back to doing some Sourcemod coding and I'm trying to change the GameInfo/Description for my Half-life 2: Deathmatch server. Based on the API, the code below should work, however, it doesn't. Is there some kind of restriction to the game I'm targeting? Always something I've wondered so help/suggestions would be appreciated, thanks!

PHP Code:
public Action:OnGetGameDescription(String:gameDesc[64])
{
    
Format(gameDescsizeof(gameDesc), GameInfo);
    
PrintToServer("[ECON] Game Description set");
    return 
Plugin_Handled;


Last edited by hazukiy; 07-21-2018 at 08:21.
hazukiy is offline
LenHard
Senior Member
Join Date: Jan 2016
Old 07-21-2018 , 10:42   Re: [HL2DM] SDKHooks OnGetGameDescription
Reply With Quote #2

PHP Code:
public Action OnGetGameDescription(char sDescription[64])
{
    
strcopy(sDescription64GameInfo);
    
PrintToServer("[ECON] Game Description set");
    return 
Plugin_Changed;

__________________


Currently accepting private requests.

Last edited by LenHard; 07-21-2018 at 10:44.
LenHard is offline
hazukiy
Member
Join Date: Jul 2009
Location: England
Old 07-22-2018 , 13:28   Re: [HL2DM] SDKHooks OnGetGameDescription
Reply With Quote #3

After directly putting this into my code, it still doesn't seem to change the game description :/
hazukiy is offline
hazukiy
Member
Join Date: Jul 2009
Location: England
Old 07-25-2018 , 19:08   Re: [HL2DM] SDKHooks OnGetGameDescription
Reply With Quote #4

I still haven't found out how to do this. According to most people it cannot be done through SDKHook anymore. This is the code I have at the moment.

PHP Code:
public Action OnGetGameDescription(char Desc[64]) {
    if(
IsMapLoaded) {
        
strcopy(Descsizeof(Desc), "XXXX");
        
PrintToServer("[Econ] Description set");
        return 
Plugin_Changed;
    }
    return 
Plugin_Continue;

hazukiy is offline
Reply


Thread Tools
Display Modes

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 13:52.


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