It's useless in messages , because you can't do "space" in cvar :
Example :
"Type /menu to see game menu."
will be shown as ( in chat) :
"Type"
with cvar :
Code:
#include <amxmodx>
new cvar_string
public plugin_init()
{
cvar_string = register_cvar("amx_message" , "Hello!")
register_clcmd("say /message" , "some_func")
}
public some_func(id)
{
new My_Cvar[7]
get_pcvar_string(cvar_string , My_Cvar , charsmax(My_Cvar))
client_print(id , print_chat , "%s" , My_Cvar)
}
another way without cvar :
Code:
#include <amxmodx>
new const MESSAGE[] = "Welcome to server"
public plugin_init()
{
register_clcmd("say /message" , "some_func")
}
public some_func(id)
{
client_print(id , print_chat , "%s" , MESSAGE)
}