AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Cvars Help (https://forums.alliedmods.net/showthread.php?t=276331)

Awesome_man 12-19-2015 11:44

Cvars Help
 
How to change value of of client_print by a cvar i mean suppose i want to register a cvar to change the value in client_print how to do that ?

Eg : client_print(id,"here is d custom cvar")

i wan to change "here is d custom cvar" with cvar value

Bugsy 12-19-2015 11:48

Re: Cvars Help
 
PHP Code:

new g_pChatMsg;

g_pChatMsg register_cvar"chatmsg" "I like to eat food when I'm humgry" );

new 
szMsg64 ];
get_pcvar_stringg_pChatMsg szMsg charsmaxszMsg ) );
client_printid print_chat "cvar says %s" szMsg ); 


Awesome_man 12-19-2015 12:02

Re: Cvars Help
 
Quote:

Originally Posted by Bugsy (Post 2374034)
PHP Code:

new g_pChatMsg;

g_pChatMsg register_cvar"chatmsg" "I like to eat food when I'm humgry" );

new 
szMsg64 ];
get_pcvar_stringg_pChatMsg szMsg charsmaxszMsg ) );
client_printid print_chat "cvar says %s" szMsg ); 


thnx man


All times are GMT -4. The time now is 18:16.

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