Thread: [Solved] gameme_message_prefix
View Single Post
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 01-06-2020 , 22:22   Re: gameme_message_prefix
Reply With Quote #18

If you use amx 1.9+

on server.cfg:

gameme_message_prefix "YourPrefixHere"

PHP Code:
#include <amxmodx>

new cvarhook:gamemehandle
new GameMeString[MAX_NAME_LENGTH]

public 
plugin_init()
{
       
register_plugin("Gameme Prefix""0.1""AlliedModders")
}

public 
plugin_cfg()
{
    
formatex(GameMeStringcharsmax(GameMeString), "YourPrefixHere")
    
gamemehandle hook_cvar_change(get_cvar_pointer("gameme_message_prefix"),"HOOK_CvarChange")
}

public 
HOOK_CvarChange(pCvar,const Old[],const New[])
{
        if (!
equal(New, GameMeString))
        {
            
disable_cvar_hook(gamemehandle)
            
set_pcvar_string(pCvarGameMeString)    
            
enable_cvar_hook(gamemehandle)
        }

__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/
iceeedr is offline
Send a message via Skype™ to iceeedr