Raised This Month: $ Target: $400
 0% 

Not printing text


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
KamiN
Senior Member
Join Date: Jun 2011
Old 11-24-2011 , 16:09   Not printing text
Reply With Quote #1

Code:
...

public plugin_init() {
.....
    register_clcmd("say /snowon", "snowon")
    register_clcmd("say /snowoff", "snowoff")
.....
}

....

public snowon(index) 
{ 
    query_client_cvar ( index, "cl_weather", "check_cvar_valueon" )
}

public check_cvar_valueon ( index, cvar, value )
{
    if ((value == 1) || (value == 2) || (value == 3))
    {
        client_print ( index, print_chat, "You have already started snowing :))" )
        return PLUGIN_HANDLED;
    }
    else {
        client_cmd(index, "cl_weather 3");
        client_print ( index, print_chat, "You have started snowing :))" )
    }

    return PLUGIN_HANDLED;

}  

public snowoff(index) 
{ 
    query_client_cvar ( index, "cl_weather", "check_cvar_valueoff" )
}

public check_cvar_valueoff ( index, cvar, value )
{

    if (value == 0)
    {
        client_print ( index, print_chat, "You have already stopped snowing =/" )
        return PLUGIN_HANDLED;
    }
    else {
        client_cmd(index, "cl_weather 0");
        client_print ( index, print_chat, "You have stopped snowing =/" )
    }

    return PLUGIN_HANDLED;

}
It doesnt prints
Code:
client_print ( index, print_chat, "You have already started snowing :))" )
and
Code:
client_print ( index, print_chat, "You have already stopped snowing =/" )
Why?

No matters how many times i write /snowon or /snowoff these two lines never shows

Last edited by KamiN; 11-24-2011 at 16:10.
KamiN 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 08:31.


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