Raised This Month: $ Target: $400
 0% 

script vote interfearing with joining


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
One shot dont miss!
Senior Member
Join Date: Jun 2005
Old 12-28-2006 , 23:25   script vote interfearing with joining
Reply With Quote #1

ok its joltpug ported to amxx well whenever someone joins the server and they press 1 or 2 for a team it says "SoandSo has voted to leave teams normal" or its says "SoandSo has voted to random teams" and then the person cant join a team i looked through the code but couldnt find a problem i debug too please someone help me.
Attached Files
File Type: sma Get Plugin or Get Source (pug.sma - 772 views - 62.2 KB)
__________________

Last edited by One shot dont miss!; 12-29-2006 at 15:02.
One shot dont miss! is offline
One shot dont miss!
Senior Member
Join Date: Jun 2005
Old 12-29-2006 , 14:31   Re: hey ppl cant join it just votes
Reply With Quote #2

the only part that is screwing up is this

Code:
}


public vote_teams() {
    new menu_msg[256]
    format(menu_msg,255,"\yTeam type?")
    add(menu_msg,255,"^n^n\y1.\w Leave normal")
    add(menu_msg,255,"^n\y2.\w Random")
    new Float:votetime = get_cvar_float("pug_vote_time") + 10.0
    set_cvar_float("pug_last_voting", get_gametime() + votetime)
    show_menu(0,(1<<0)|(1<<1),menu_msg,floatround(votetime),"Team")
    set_task(votetime,"check_teamvotes",task_teamvote)
    showsay(0,v_team_started)
    //client_print(0,print_chat,v_team_started)
    teamchoice[0]=teamchoice[1]=0
    return PLUGIN_CONTINUE
}

public count_teamvotes(id,key) {
    if(get_cvar_num("pug_vote_answers")==1) {
        new player_name[32]
        get_user_name(id,player_name,31)
        client_print(0,print_chat,"%s voted for %s",player_name,key ?"random teams":"leaving normal")
    }
    ++teamchoice[key]
    return PLUGIN_HANDLED
}

public check_teamvotes() {
    new ms[300]
    if(teamchoice[0] > teamchoice[1]) {
        format(ms,299,v_normal_succes,teamchoice[0])
        showsay(0,ms)
        //client_print(0,print_chat,v_normal_succes, teamchoice[0])
        roundcount=0
        ct_score=0
        t_score=0
        swap_teams=0
        pug_fase=1
        pug_start_fase=1
        set_task(2.0,"start_pug",task_start)
    } else {
        format(ms,299,v_random_succes,teamchoice[1])
        showsay(0,ms)
        //client_print(0,print_chat,v_random_succes, teamchoice[1])
        set_task(1.0,"shuffle_teams",task_shuffle)
    }
    return PLUGIN_HANDLED
__________________
One shot dont miss! is offline
Reply



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 22:28.


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