Raised This Month: $ Target: $400
 0% 

get_cvar_num in menus help


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Infinity
Junior Member
Join Date: Sep 2009
Old 08-08-2012 , 01:40   get_cvar_num in menus help
Reply With Quote #1

I'm currently making a menu and I've bumped into a problem where ColorChat isn't sending a message. I'm pretty sure I've used the CVAR functions incorrectly. Any pointers?

No compiling errors are given.

Includes:
#include <amxmodx>
#include <amxmisc>
#include <colorchat>

PHP Code:
        case 1:
        {
        if(
get_cvar_num("mp_friendlyfire") & 1)
        {
        new 
name[32]
        
get_user_name(idname31)
        
ColorChat(0GREEN"^x04%s ^x01 has turned friendlyfire ^x04ON"name)
        
set_cvar_num("mp_friendlyfire",1)
        }
        else if(
get_cvar_num("mp_friendlyfire") & 1)
        {
        new 
name[32]
        
get_user_name(idname31)
        
ColorChat(0GREEN"^x04%s ^x01 has turned friendlyfire ^x04OFF"name)
        
set_cvar_num("mp_friendlyfire",0)
        } 

Last edited by Infinity; 08-08-2012 at 01:41.
Infinity is offline
 


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 05:52.


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