AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   [HL2DM] SDKHooks OnGetGameDescription (https://forums.alliedmods.net/showthread.php?t=309320)

hazukiy 07-21-2018 07:03

[HL2DM] SDKHooks OnGetGameDescription
 
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;



LenHard 07-21-2018 09:42

Re: [HL2DM] SDKHooks OnGetGameDescription
 
PHP Code:

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



hazukiy 07-22-2018 12:28

Re: [HL2DM] SDKHooks OnGetGameDescription
 
After directly putting this into my code, it still doesn't seem to change the game description :/

hazukiy 07-25-2018 18:08

Re: [HL2DM] SDKHooks OnGetGameDescription
 
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;




All times are GMT -4. The time now is 07:56.

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