AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   function or plugin broken? (https://forums.alliedmods.net/showthread.php?t=224572)

^SmileY 08-25-2013 20:49

function or plugin broken?
 
This code goes not updated when player get info (Server List)

PHP Code:

#include <amxmodx>
#include <fakemeta>

new p_Name;

public 
plugin_init()
{
    
register_plugin("Game Namer","1.1","NeuroToxin");

    
p_Name register_cvar("amx_gamename","Counter-Strike");
    
    
register_forward(FM_GetGameDescription,"FM_GameDesc");
}

public 
FM_GameDesc()
{
    new 
szName[32];
    
get_pcvar_string(p_Name,szName,charsmax(szName));
    
    
forward_return(FMV_STRING,szName);
    
    return 
FMRES_SUPERCEDE;


Any Suggestion updates?

devilicioux 08-26-2013 05:07

Re: function or plugin broken?
 
Quote:

Originally Posted by ^SmileY (Post 2021708)
This code goes not updated when player get info (Server List)

PHP Code:

#include <amxmodx>
#include <fakemeta>

new p_Name;

public 
plugin_init()
{
    
register_plugin("Game Namer","1.1","NeuroToxin");

    
p_Name register_cvar("amx_gamename","Counter-Strike");
    
    
register_forward(FM_GetGameDescription,"FM_GameDesc");
}

public 
FM_GameDesc()
{
    new 
szName[32];
    
get_pcvar_string(p_Name,szName,charsmax(szName));
    
    
forward_return(FMV_STRING,szName);
    
    return 
FMRES_SUPERCEDE;


Any Suggestion updates?

Check if fakemeta is enabled ? Also
In server.cfg, put amx_gamename "Gamename goes here"

^SmileY 08-26-2013 07:12

Re: function or plugin broken?
 
Quote:

Originally Posted by devilicioux (Post 2021873)
Check if fakemeta is enabled ? Also
In server.cfg, put amx_gamename "Gamename goes here"

sorry i not explained better, is not updating hostname i refer to function broken not plugin working :)

Last updates are borken with FMV_String set, and did not setting game name correctly.

sami_spt 08-26-2013 07:26

Re: function or plugin broken?
 
yea.. after the last update the game name changer doesn't work..

it works for me when I edit the .sma rather than adding in server.cfg amx_gamename....

^SmileY 08-26-2013 07:54

Re: function or plugin broken?
 
Quote:

Originally Posted by sami_spt (Post 2021923)
yea.. after the last update the game name changer doesn't work..

it works for me when I edit the .sma rather than adding in server.cfg amx_gamename....

Wrong, is not changing according to cvar, it is only changing in first time when FMV_String is used..


All times are GMT -4. The time now is 19:14.

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