Raised This Month: $12 Target: $400
 3% 

Solved gameme_message_prefix


Post New Thread Reply   
 
Thread Tools Display Modes
iclassdon
AlliedModders Donor
Join Date: May 2006
Old 12-06-2019 , 14:23   Re: gameme_message_prefix
Reply With Quote #11

Quote:
Originally Posted by Napoleon_be View Post
Have u tried putting the command in server.cfg and executing the config in server console? Else i would suggest just changing this line into the prefix u want
Code:
g_gameme_message_prefix = register_cvar("gameme_message_prefix", "YourPrefixHere")
Yes I did put it in server config. I tried your suggestion and edited the prefix and compiled, same dreaded gameME prefix shows up.

You guys rock btw thanks for all the help.

Last edited by iclassdon; 12-06-2019 at 14:30.
iclassdon is offline
Send a message via MSN to iclassdon
JocAnis
Veteran Member
Join Date: Jun 2010
Old 12-06-2019 , 14:43   Re: gameme_message_prefix
Reply With Quote #12

Lol try with adding .flag="b" in set_task, so it will repeat every sec in a loop
Problem is because we dont know when its get reseted to their cvar,could be round end idk
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...) - not active (dec 2022)
JocAnis is offline
iclassdon
AlliedModders Donor
Join Date: May 2006
Old 12-06-2019 , 17:16   Re: gameme_message_prefix
Reply With Quote #13

PHP Code:
#include <amxmodx>
#include <amxmisc>

public plugin_init()
{
    
register_plugin("Set GameME Prefix""1.0""cool & JocAnis")

    
set_task 20"setit"0,_,_,"b"
}
public 
setit()
{
    
set_cvar_string"gameme_message_prefix""[YouPrefixHere]" )

Solved! I tried adding .flag="b" but it wouldn't compile. I did some research though and figured it out. (set_task ( 0.5, "setit", 0,_,_,"b", 0 ). Thanks for pointing me in the right direction JocAnis & Sanjay Singh.

Last edited by iclassdon; 12-06-2019 at 20:59.
iclassdon is offline
Send a message via MSN to iclassdon
JocAnis
Veteran Member
Join Date: Jun 2010
Old 12-06-2019 , 19:15   Re: gameme_message_prefix
Reply With Quote #14

Sorry, it was .flags
Just my suggestion is to use the minimum required task for it, maybe try 20sec, not 0.5sec...not a big thing of performance here, but again..
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...) - not active (dec 2022)
JocAnis is offline
Old 12-06-2019, 19:29
Napoleon_be
This message has been deleted by Napoleon_be.
iclassdon
AlliedModders Donor
Join Date: May 2006
Old 01-04-2020 , 21:02   Re: gameme_message_prefix
Reply With Quote #15

PHP Code:
#include <amxmodx>
#include <amxmisc>

public plugin_init()
{
    
register_plugin("Set GameME Prefix""1.0""cool & JocAnis")

    
set_task 20"setit"0,_,_,"b"
}
public 
setit()
{
    
set_cvar_string"gameme_message_prefix""[YouPrefixHere]" )

Why do I get tag mismatch on line 8? It compiled fine before. Editing the seconds from 0.5 to 20 seconds for performance gain. I think it's eating away at my CPU. Using AMXXStudio to compile.

Last edited by iclassdon; 01-05-2020 at 01:44.
iclassdon is offline
Send a message via MSN to iclassdon
JocAnis
Veteran Member
Join Date: Jun 2010
Old 01-04-2020 , 21:53   Re: gameme_message_prefix
Reply With Quote #16

you must set a float there, so it will be: set_task( 20.0, "setit", 0, .flags = "b" )
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...) - not active (dec 2022)

Last edited by JocAnis; 01-04-2020 at 21:55.
JocAnis is offline
iclassdon
AlliedModders Donor
Join Date: May 2006
Old 01-06-2020 , 21:12   Re: gameme_message_prefix
Reply With Quote #17

Your the man JocAnis thanks!
iclassdon is offline
Send a message via MSN to iclassdon
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
AllMassive
Senior Member
Join Date: Sep 2004
Location: /dev/urandom
Old 02-05-2023 , 01:48   Re: gameme_message_prefix
Reply With Quote #19

or within the account-settings - change the 'Command Prefix' named 'Cmd #1' to your desired prefix.
AllMassive 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 15:08.


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