Raised This Month: $ Target: $400
 0% 

If cvar is enabled, hide /custom command


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
LearninG
Senior Member
Join Date: Apr 2019
Location: Iran
Old 09-15-2019 , 02:17   Re: If cvar is enabled, hide /custom command
Reply With Quote #4

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) }

Last edited by LearninG; 09-15-2019 at 04:34.
LearninG is offline
 



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 17:25.


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