Raised This Month: $ Target: $400
 0% 

hud colors with cvar


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
GhostMan
Senior Member
Join Date: Jun 2012
Old 06-04-2013 , 06:53   hud colors with cvar
Reply With Quote #1

How can i put hud message color in cvar? So that i wouldn't need to recompile plugin if i want to change its collor.

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

new const PLUGIN[]  = "Connect adv"
new const VERSION[] = "1.3"
new const AUTHOR[]  = "none"

new hudmessage1HudOnChatOn

public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
hudmessage1 CreateHudSyncObj()
    
    
ChatOn register_cvar("conn_chat""1")
    
HudOn register_cvar("conn_hud""1")
    
    
register_dictionary("connrekl.txt")
}

public 
client_putinserver(id
{    
    if(!
is_user_bot(id)) 
    {
        
set_task(20.0"ShowMsg"id)
    }
}

public 
ShowMsg(id)
{
    if(
get_pcvar_num(ChatOn))
    {
        
client_print(idprint_chat"%L"id"REKLAMA_CHAT")
    }
    
    if(
get_pcvar_num(HudOn))
    {
        
set_hudmessage(42170420.020.2710.510.0)
        
ShowSyncHudMsg(idhudmessage1"%L"id"REKLAMA_HUD")
    }
}

public 
client_disconnect(id)

    
remove_task(id)

GhostMan 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 16:20.


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