AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   vote cmd help (https://forums.alliedmods.net/showthread.php?t=171467)

RuleBreaker 11-06-2011 09:44

vote cmd help
 
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;
}



All times are GMT -4. The time now is 14:27.

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