Raised This Month: $ Target: $400
 0% 

g[s]et_cvar and g[s]et_pcvar


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 11-04-2007 , 01:58   Re: g[s]et_cvar and g[s]et_pcvar
Reply With Quote #6

if you really wanted to optimize it, you could just do:
Code:
public plugin_init()
{
    register_plugin("test", "", "")
}

public client_putinserver(id)
{
    static test_pcvar;
    if( !test_pcvar )
        test_pcvar = register_cvar("amx_test_cvar", "1")
    if (get_pcvar_num(test_pcvar))
        client_print(0, print_chat, "test")
}
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
 



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 01:21.


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