Raised This Month: $ Target: $400
 0% 

vote cmd help


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
RuleBreaker
Senior Member
Join Date: May 2011
Old 11-06-2011 , 09:44   vote cmd help
Reply With Quote #1

I used this source https://forums.alliedmods.net/showth...ghlight=knives
to add vote option to my plugin and now I have problem with plugin. I always get negative answer

Code:
public count_votes ( id, key ) {
    if ( get_cvar_float ( "amx_vote_answers" ) ) {
        new name[32];
        get_user_name ( id, name, 31 );
        client_print ( 0, print_chat, "* %s voted %s", name, key ? "for" : "against" );
    }
    ++choice[key];
    return PLUGIN_HANDLED;
}

public check_the_votes ( id ) {
    if ( choice[0] > choice[1] ) {
        myfunction()
    }
    else {
        client_print ( 0, print_chat, "* You voted against");
    }
    return PLUGIN_CONTINUE;
}
RuleBreaker 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 14:27.


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