Results 1 to 2 of 2
Like Tree2Likes
  • 2 Post By King-OrgY

Thread: perfect cod4 auto vote

  1. #1
    Admin King-OrgY's Avatar
    Join Date
    Nov 2007
    Posts
    4,537

    perfect cod4 auto vote

    haven't post any code in the last time, so i have pick this from my bot
    Code:
    int AutoVoteRender = 0;
    int VoteTimer = 0;
    void AutoVote( ){    
        int randomClientNum = rand( ) % MAX_CLIENTS;
        VoteTimer = (*(int*)0x74AA90 - *(int*)0x794460) / 1000;
        if ( (*(int*)0x74AA90 - *(int*)0x794460) / 1000 < 0 )
            VoteTimer = 0;
        if(!VoteTimer ){//don't vote while we vote    
            if( timeGetTime( ) < AutoVoteRender + 2 ){//some simple delay to avoid getting kicked for to many requests ( timeGetTime is the better one here becouse if we lag the cg->time stops counting )
                return;
            }
            centity_t* Player = &cg_entities[randomClientNum];      
            if( Player && clientInfo[randomClientNum].infoValid )        {
                char Vote[256];
                sprintf(Vote, "callvote clientkick %i\n", clientInfo[randomClientNum].ClientNum );
                CG_trap_SendConsoleCommand(1, 1, Vote);
            }
            AutoVoteRender = cg->time;
        }
    }
    Seraphim and stealth93 like this.

  2. #2
    Moderator Seraphim's Avatar
    Join Date
    Aug 2008
    Posts
    1,062

    Re: perfect cod4 auto vote

    Since no one else will post and say it lmao

    Nice job and works perfectly

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •