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


2Likes
LinkBack URL
About LinkBacks

Reply With Quote




Bookmarks