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;
}