AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   FM_GetGameDescription broken? (https://forums.alliedmods.net/showthread.php?t=210799)

Leon M. 03-14-2013 16:21

FM_GetGameDescription broken?
 
I'm changing the name of the game according the mod which is running.

Examples:
Paintball Mod is running -> Counter-Strike: Paintball
CaptureTheFlag runs -> Counter-Strike: Capture The Flag

It worked for a long time now and I didn't changed my code. Do I loose my mind or is FM_GetGameDescription broken since the recent updates of the engine?

Any help is appreciated, regards.
Leon

ConnorMcLeod 03-14-2013 16:47

Re: FM_GetGameDescription broken?
 
Try to hook it post so you can get the string return value and try to print it or to write it in a file to see 1. if function is called, 2. if something is still returned.

Arkshine 03-14-2013 16:54

Re: FM_GetGameDescription broken?
 
Code is unchanged, but it's possible not called anymore or somehow locked on steam, not checked.

Bos93 03-14-2013 17:16

Re: FM_GetGameDescription broken?
 
Works:

PHP Code:

#include < amxmodx >
#include < fakemeta >


public plugin_init()
{
    
register_forwardFM_GetGameDescription"FM_Hook__GetGameDescription" );
}

public 
FM_Hook__GetGameDescription( )
{
    
forward_returnFMV_STRING"Test" )

    return 
FMRES_SUPERCEDE;



Leon M. 03-14-2013 17:17

Re: FM_GetGameDescription broken?
 
Good points Connor, will test it and reply asap. Time to sleep now :/


BTW: Here the small code ^^
PHP Code:

#include <fakemeta>

public plugin_init(){
    
// ...
    
register_forward(FM_GetGameDescription"fwd_gamedesc")
    
// ...
}

public 
fwd_gamedesc(){
    
forward_return(FMV_STRING"Counter-Strike: Paintball")
    return 
FMRES_SUPERCEDE


EDIT: @bos
Well, probably the ':' cause the trouble. Although it worked before. Also, are you running in beta?

EDIT2: @Connor, @Arkshine
It seems that it gets not called anymore. Added a chat and console message to the hook. No prints :)

Quote:

] version
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
Exe build: 14:59:14 Feb 13 2013 (5956)

] meta version
Metamod v1.20 2013-02-16 (5:13)
by Will Day <[email protected]>
http://www.metamod.org/
compiled: Feb 16 2013, 17:11:35 +0100 (optimized)
ifvers: 5:13

] amxx version
AMX Mod X 1.8.2
Authors:
David "BAILOPAN" Anderson, Pavol "PM OnoTo" Marko, Felix "SniperBeamer" Geyer
Jonny "Got His Gun" Bergstrom, Lukasz "SidLuke" Wlasinski
Christian "Basic-Master" Hammacher, Borja "faluco" Ferrer
Scott "Damaged Soul" Ehlert
Compiled: Feb 14 2013, 00:55:00
URL:http://www.amxmodx.org/
Core mode: JIT
EDIT3: @all
Tested on an outdated server and indeed it works just fine. Any chance for a workaround?

Quote:

] version
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
Exe build: 11:30:01 Aug 28 2012 (5787)

Leon M. 03-24-2013 13:30

Re: FM_GetGameDescription broken?
 
Anyone already tested ServerName Msg? Gonna try it soon if I'm back at home :)

ConnorMcLeod 03-24-2013 14:26

Re: FM_GetGameDescription broken?
 
It's just name appearing above scoreboard

Leon M. 03-24-2013 14:53

Re: FM_GetGameDescription broken?
 
damn :)

^SmileY 05-30-2013 20:05

Re: FM_GetGameDescription broken?
 
Hey, the Game description is working, but it only in server start.
If you change a cvar, the game description not update it.

simanovich 05-31-2013 08:49

Re: FM_GetGameDescription broken?
 
Quote:

Originally Posted by ^SmileY (Post 1961474)
Hey, the Game description is working, but it only in server start.
If you change a cvar, the game description not update it.

Nice bump

P.S: FM_GetGameDescription is called when client gets server info (try to print a message - it will be printed every time the client gets server info).


All times are GMT -4. The time now is 21:42.

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