//////////////////////////////////////////////////////////////////////////////////////////// // menus.inc Version 1.51 Date: AUG/01/2006 // // RS UAIO (Ultimate All-In-One) Admin Menu System (Multilingual) // File: UAIO Admin - Main Source File // // Created By: Rob Secord, B.Sc. // Alias: xeroblood (aka; Achilles; sufferer) // Email: xeroblood@msn.com // // Updated By: Dan Weeks // Alias: $uicid3 // Email: suicid3m3@gmail.com // // This File is part of UAIO (Ultimate All-In-One) Admin Menu. // //////////////////////////////////////////////////////////////////////////////////////////// #if defined _UAIO_MENUS_INCLUDED #endinput #endif #define _UAIO_MENUS_INCLUDED // __________________ //___/ ClCmd_UAIOMenu() \___________________________________________________________________ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Starts the UAIO Menu System. COMMAND = uaio_menu ACCESS = UAIO_LVL_USER //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ public ClCmd_UAIOMenu( id, lvl, cid ) { if( !cmd_access( id, lvl, cid, 0 ) ) return PLUGIN_HANDLED if( !UAIO_PluginEnabled( UAIO_NULL ) ) { client_print( id, print_console, "%L", LANG_PLAYER, "PLUGIN_DISABLED", PLUGIN_MOD, PLUGIN_NAME ) client_print( id, print_chat, "%L", LANG_PLAYER, "PLUGIN_DISABLED", PLUGIN_MOD, PLUGIN_NAME ) if( access( id, UAIO_LVL_SUPER ) ) console_print( id, "%L", LANG_PLAYER, "ENABLE_PLUGIN", PLUGIN_MOD, PLUGIN_NAME ) return PLUGIN_HANDLED } #if defined UAIO_DEBUG_MENU client_print( id, print_console, "^n[DEBUG] ClCmd_UAIOMenu Called! (Menu Started)^n" ) #endif g_iCurrCommand[id-1] = UAIO_NULL g_iCurrPlayer[id-1] = UAIO_NULL g_iCurrType[id-1] = UAIO_NULL g_iSettingsType[id-1] = UAIO_NULL if( !g_bIsAdmin[id-1] ) g_iMenuOrder[id-1] = MO_COMMANDS if( g_iMenuOrder[id-1] == MO_PLAYERS ) Menu_UAIOPlayer( id, g_iMenuPosition[id-1] = 0 ) else Menu_UAIOCommandType( id ) return PLUGIN_HANDLED } // ___________________ //___/ Menu_UAIOPlayer() \__________________________________________________________________ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Displays the In-Game Players Menu. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ public Menu_UAIOPlayer( id, pos ) { #if defined UAIO_DEBUG_MENU client_print( id, print_console, "^n[DEBUG] Menu_UAIOPlayer Called!" ) client_print( id, print_console, "^n[DEBUG] [Player:%d][Command:%d][Type:%d]^n", g_iCurrPlayer[id-1], g_iCurrCommand[id-1], g_iCurrType[id-1] ) #endif if( pos < 0 ) return g_iCurrPlayer[id-1] = UAIO_NULL get_players( g_iMenuPlayers[id-1], g_iMenuPlayersNum[id-1] ) new i, j, iCurrKey = 0 new szUserName[STR_T] new szMenuBody[MENU_SIZE] new iStart = (pos) ? pos * MENU_DISPLAY - 3 : 0 if( iStart >= g_iMenuPlayersNum[id-1] ) iStart = pos = g_iMenuPosition[id-1] = 0 new iLen = format( szMenuBody, MENU_SIZE-1, "\yPlayer Menu\R%d/%d^n\w^n", (pos+1), (g_iMenuPlayersNum[id-1] / MENU_DISPLAY + ((g_iMenuPlayersNum[id-1] % MENU_DISPLAY) ? 1 : 0 )) ) new iEnd = (pos) ? iStart + MENU_DISPLAY : iStart + MENU_DISPLAY - 3 new iKeys = (1<<9) if( iEnd > g_iMenuPlayersNum[id-1] ) iEnd = g_iMenuPlayersNum[id-1] if( !pos ) { iCurrKey += 3 if( (g_iCurrCommand[id-1] == UAIO_GetBitPosition(UAIO_M_CEXEC)) || (g_iCurrCommand[id-1] == UAIO_GetBitPosition(UAIO_E_BAN_P)) || (g_iCurrCommand[id-1] == UAIO_GetBitPosition(UAIO_E_BAN_T)) ) { iLen += format( szMenuBody[iLen], (MENU_SIZE-1-iLen), "\d%L\w", LANG_PLAYER, "MENU_TEAMS" ) }else { iKeys |= (1<<0|1<<1|1<<2) iLen += format( szMenuBody[iLen], (MENU_SIZE-1-iLen), "%L", LANG_PLAYER, "MENU_TEAMS" ) } } for( i = iStart; i < iEnd; i++ ) { j = g_iMenuPlayers[id-1][i] get_user_name( j, szUserName, STR_T-1 ) if( (g_iCurrType[id-1] != UAIO_NULL) && UAIO_HasImmunity( j, g_iCurrType[id-1] ) ) { iCurrKey++ iLen += format( szMenuBody[iLen], (MENU_SIZE-1-iLen), "\d%d. %s^n\w", iCurrKey, szUserName ) }else { iKeys |= (1< MAX_V_COMMANDS ) iEnd = MAX_V_COMMANDS for( i = iStart; i < iEnd; i++ ) { format( szTitle, STR_L-1, "%L", LANG_PLAYER, g_szVCmdTitle[i] ) if( !UAIO_HasCmdAccess( id, CMDTYPE_VOTE, (1< MAX_G_COMMANDS ) iEnd = MAX_G_COMMANDS for( i = iStart; i < iEnd; i++ ) { format( szTitle, STR_L-1, "%L", LANG_PLAYER, g_szGCmdTitle[i] ) if( !UAIO_HasCmdAccess( id, CMDTYPE_GOOD, (1< MAX_E_COMMANDS ) iEnd = MAX_E_COMMANDS for( i = iStart; i < iEnd; i++ ) { format( szTitle, STR_L-1, "%L", LANG_PLAYER, g_szECmdTitle[i] ) if( !UAIO_HasCmdAccess( id, CMDTYPE_EVIL, (1< MAX_M_COMMANDS ) iEnd = MAX_M_COMMANDS for( i = iStart; i < iEnd; i++ ) { format( szTitle, STR_L-1, "%L", LANG_PLAYER, g_szMCmdTitle[i] ) if( !UAIO_HasCmdAccess( id, CMDTYPE_MISC, (1<= 1000) && ((1< g_iMapCount ) iEnd = g_iMapCount for( i = iStart; i < iEnd; i++ ) { iKeys |= (1<= MO_MAX_RIFLE ) iStart = pos = g_iWeaponMenuPos[id-1] = 0 iLen = format( szMenuBody, (MENU_SIZE-1), "\yRifles Menu:\R%d/2^n\w^n", pos + 1 ) iEnd = iStart + MENU_DISPLAY if( iEnd > MO_MAX_RIFLE ) iEnd = MO_MAX_RIFLE for( i = iStart; i < iEnd; i++ ) { iKeys |= (1<= MO_MAX_EXTRA ) iStart = pos = g_iWeaponMenuPos[id-1] = 0 iLen = format( szMenuBody, (MENU_SIZE-1), "\yExtras Menu:\R%d/2^n\w^n", pos + 1 ) iEnd = iStart + MENU_DISPLAY if( iEnd > MO_MAX_EXTRA ) iEnd = MO_MAX_EXTRA for( i = iStart; i < iEnd; i++ ) { iKeys |= (1< iCount ) iEnd = iCount for( i = iStart; i < iEnd; i++ ) { iKeys |= (1<= 1000 ) { switch( g_iCurrType[id-1] ) { case CMDTYPE_VOTE: client_cmd( id, "%s %s", g_szVCmdConsole[g_iCurrCommand[id-1]], g_szVarCmdArgs[g_iCurrPlayer[id-1]-1000] ) case CMDTYPE_GOOD: client_cmd( id, "%s %s", g_szGCmdConsole[g_iCurrCommand[id-1]], g_szVarCmdArgs[g_iCurrPlayer[id-1]-1000] ) case CMDTYPE_EVIL: client_cmd( id, "%s %s", g_szECmdConsole[g_iCurrCommand[id-1]], g_szVarCmdArgs[g_iCurrPlayer[id-1]-1000] ) case CMDTYPE_MISC: client_cmd( id, "%s %s", g_szMCmdConsole[g_iCurrCommand[id-1]], g_szVarCmdArgs[g_iCurrPlayer[id-1]-1000] ) } }else { switch( g_iCurrType[id-1] ) { case CMDTYPE_VOTE: client_cmd( id, "%s #%d", g_szVCmdConsole[g_iCurrCommand[id-1]], get_user_userid(g_iCurrPlayer[id-1]) ) case CMDTYPE_GOOD: client_cmd( id, "%s #%d", g_szGCmdConsole[g_iCurrCommand[id-1]], get_user_userid(g_iCurrPlayer[id-1]) ) case CMDTYPE_EVIL: client_cmd( id, "%s #%d", g_szECmdConsole[g_iCurrCommand[id-1]], get_user_userid(g_iCurrPlayer[id-1]) ) case CMDTYPE_MISC: client_cmd( id, "%s #%d", g_szMCmdConsole[g_iCurrCommand[id-1]], get_user_userid(g_iCurrPlayer[id-1]) ) } } // Show Menu Again if( g_iMenuOrder[id-1] == MO_PLAYERS ) Menu_UAIOCommandType( id ) else Menu_UAIOPlayer( id, g_iMenuPosition[id-1] = 0 ) } } return } // ___________________ //___/ Menu_UAIOAction() \__________________________________________________________________ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Handles Completion of UAIO Menu System. Issues Command for Non-Instant Actions. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ public Menu_UAIOAction( id, key ) { #if defined UAIO_DEBUG_MENU client_print( id, print_console, "^n[DEBUG] Menu_UAIOAction Called!" ) client_print( id, print_console, "^n[DEBUG] [Player:%d][Command:%d][Type:%d]^n", g_iCurrPlayer[id-1], g_iCurrCommand[id-1], g_iCurrType[id-1] ) #endif new iHasPMenu switch( g_iCurrType[id-1] ) { case CMDTYPE_VOTE: iHasPMenu = g_iVUsesPMenu[g_iCurrCommand[id-1]] case CMDTYPE_GOOD: iHasPMenu = g_iGUsesPMenu[g_iCurrCommand[id-1]] case CMDTYPE_EVIL: iHasPMenu = g_iEUsesPMenu[g_iCurrCommand[id-1]] case CMDTYPE_MISC: iHasPMenu = g_iMUsesPMenu[g_iCurrCommand[id-1]] } if( g_iSettingsType[id-1] == SM_MAPS ) { if( key == 8 ) { UAIO_MapsMenu( id, ++g_iMenuPosition[id-1] ) return }else if( key == 9 ) { if( g_iMenuPosition[id-1] > 0 ) { UAIO_MapsMenu( id, --g_iMenuPosition[id-1] ) }else { Menu_UAIOCommandType( id ) } return } }else if( g_iSettingsType[id-1] == SM_FILE ) { if( key == 8 ) { UAIO_FileMenu( id, ++g_iMenuPosition[id-1] ) return }else if( key == 9 ) { if( g_iMenuPosition[id-1] > 0 ) { UAIO_FileMenu( id, --g_iMenuPosition[id-1] ) }else { if( g_iMenuOrder[id-1] == MO_PLAYERS ) Menu_UAIOCommandType( id ) else Menu_UAIOPlayer( id, g_iMenuPosition[id-1] = 0 ) } return } }else { if( key == 9 ) { if( g_iMenuOrder[id-1] == MO_PLAYERS ) Menu_UAIOCommandType( id ) else { if( iHasPMenu ) Menu_UAIOPlayer( id, g_iMenuPosition[id-1] = 0 ) else Menu_UAIOCommandType( id ) } return } } new i, iSettingsIdx, iFlags new szCommand[STR_T], szCvarVal[STR_S], szTemp[8] switch( g_iCurrType[id-1] ) { case CMDTYPE_VOTE: { format( szCommand, STR_T-1, "%s", g_szVCmdConsole[g_iCurrCommand[id-1]] ) if( g_iSettingsType[id-1] == SM_CVAR ) get_cvar_string( g_szVCmdCvar[g_iCurrCommand[id-1]], szCvarVal, STR_S-1 ) } case CMDTYPE_GOOD: { format( szCommand, STR_T-1, "%s", g_szGCmdConsole[g_iCurrCommand[id-1]] ) if( g_iSettingsType[id-1] == SM_CVAR ) get_cvar_string( g_szGCmdCvar[g_iCurrCommand[id-1]], szCvarVal, STR_S-1 ) } case CMDTYPE_EVIL: { format( szCommand, STR_T-1, "%s", g_szECmdConsole[g_iCurrCommand[id-1]] ) if( g_iSettingsType[id-1] == SM_CVAR ) get_cvar_string( g_szECmdCvar[g_iCurrCommand[id-1]], szCvarVal, STR_S-1 ) } case CMDTYPE_MISC: { format( szCommand, STR_T-1, "%s", g_szMCmdConsole[g_iCurrCommand[id-1]] ) if( g_iSettingsType[id-1] == SM_CVAR ) get_cvar_string( g_szMCmdCvar[g_iCurrCommand[id-1]], szCvarVal, STR_S-1 ) } } if( g_iSettingsType[id-1] == SM_MAPS ) { iSettingsIdx = g_iMenuPosition[id-1] * MENU_DISPLAY + key client_cmd( id, "%s %s", szCommand, g_szMapNames[iSettingsIdx] ) // Return Directly to Commands Menu (If not Vote Command) if( g_iCurrType[id-1] != CMDTYPE_VOTE ) Menu_UAIOCommandType( id ) return } else if( g_iSettingsType[id-1] == SM_CVAR ) { new szSetting[MAX_CMD_CVARS][STR_T] UAIO_ExplodeString( szSetting, MAX_CMD_CVARS, szCvarVal, STR_S-1, ' ' ) if( iHasPMenu ) { if( g_iCurrPlayer[id-1] >= 1000 ) client_cmd( id, "%s %s %s", szCommand, g_szVarCmdArgs[g_iCurrPlayer[id-1]-1000], szSetting[key] ) else client_cmd( id, "%s #%d %s", szCommand, get_user_userid(g_iCurrPlayer[id-1]), szSetting[key] ) } else client_cmd( id, "%s %s", szCommand, szSetting[key] ) } else if( g_iSettingsType[id-1] == SM_FILE ) { iSettingsIdx = g_iMenuPosition[id-1] * MENU_DISPLAY + key if( (1<= 1000 ) format( szTemp, 7, "%s", g_szVarCmdArgs[g_iCurrPlayer[id-1]-1000] ) else format( szTemp, 7, "#%d", get_user_userid( g_iCurrPlayer[id-1] ) ) replace( szCommand, STR_T-1, "{userid}", szTemp ) if( iFlags & EXEC_SERVER ) server_cmd( szCommand ) else if( iFlags & EXEC_ADMIN ) client_cmd( id, szCommand ) else if( iFlags & EXEC_CLIENT ) client_cmd( g_iCurrPlayer[id-1], "%s", szCommand ) else if( iFlags & EXEC_ALLCL ) { get_players( g_iMenuPlayers[id-1], g_iMenuPlayersNum[id-1] ) for( i = 0; i < g_iMenuPlayersNum[id-1]; i++ ) client_cmd( g_iMenuPlayers[id-1][i], "%s", szCommand ) } } else if( g_iSettingsType[id-1] == SM_TOGGLE ) { client_cmd( id, "%s %d", szCommand, (key)?0:1 ) } else if( g_iSettingsType[id-1] == SM_MODEL ) { if( g_iCurrPlayer[id-1] >= 1000 ) client_cmd( id, "%s %s %d", szCommand, g_szVarCmdArgs[g_iCurrPlayer[id-1]-1000], (key + 1) ) else client_cmd( id, "%s #%d %d", szCommand, get_user_userid(g_iCurrPlayer[id-1]), (key + 1) ) } else { if( iHasPMenu ) { if( g_iCurrPlayer[id-1] >= 1000 ) client_cmd( id, "%s %s %d", szCommand, g_szVarCmdArgs[g_iCurrPlayer[id-1]-1000], key ) else client_cmd( id, "%s #%d %d", szCommand, get_user_userid(g_iCurrPlayer[id-1]), key ) } else client_cmd( id, "%s %d", szCommand, key ) } // Show Menu Again (If not Vote Command) if( g_iCurrType[id-1] != CMDTYPE_VOTE ) { if( g_iMenuOrder[id-1] == MO_PLAYERS ) { Menu_UAIOCommandType( id ) }else { if( iHasPMenu ) Menu_UAIOPlayer( id, g_iMenuPosition[id-1] = 0 ) else Menu_UAIOCommandType( id ) } } return } // ______________________________________________ // / UAIO Arena Weapon Menu System \_____________ //___/ \ Type: Misc \________________________ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // // ________________________ //___/ UAIO_ArenaWeaponMenu() \__________________________________________________________________ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Displays the Weapons Menu. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ public UAIO_ArenaWeaponMenu( id ) { if( g_iCurrType[id-1] == CMDTYPE_VOTE) g_bArenaVote[id-1] = true else g_bArenaVote[id-1] = false new szMenuBody[MENU_SIZE], szWeapon[STR_M] new i, iKeys = (1<<7)|(1<<9), iLen = format( szMenuBody, (MENU_SIZE-1), "\yArena Menu:\w^n" ) for( i = 0; i < AR_MAX_MAIN; i++ ) { if(!g_bArenaEnabled) iKeys |= (1<= AR_MAX_RIFLE ) iStart = pos = g_iWeaponMenuPos[id-1] = 0 iLen = format( szMenuBody, (MENU_SIZE-1), "\yArena Rifles Menu:\R%d/2^n\w^n", pos + 1 ) iEnd = iStart + AR_RIFLE_DISPLAY if( iEnd > AR_MAX_RIFLE ) iEnd = AR_MAX_RIFLE for( i = iStart; i < iEnd; i++ ) { if( (g_iWepCount < AR_MAX_GUNS) || UAIO_IsInArena(g_iRifleConst[i]) && !g_bArenaEnabled) iKeys |= (1<= 1000 ) format( szCmd, STR_T-1, "uaio_weapon %s %d", g_szVarCmdArgs[g_iCurrPlayer[id-1]-1000], g_iWeaponNum[iOption] ) else format( szCmd, STR_T-1, "uaio_weapon #%d %d", get_user_userid(g_iCurrPlayer[id-1]), g_iWeaponNum[iOption] ) client_cmd( id, szCmd ) } } return PLUGIN_HANDLED } // __________________ //___/ Menu_UAIORifle() \___________________________________________________________________ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Handles Completion of UAIO Weapons Menu - Rifles //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ public Menu_UAIORifle( id, key ) { switch( key ) { case 8: { // User Selected "More..." Option UAIO_RifleMenu( id, ++g_iWeaponMenuPos[id-1] ) } case 9: { // User Chose to go Back to Previous Menu if( g_iWeaponMenuPos[id-1] ) { UAIO_RifleMenu( id, --g_iWeaponMenuPos[id-1] ) }else { UAIO_WeaponMenu( id ) } } default: { new iOption = g_iWeaponMenuPos[id-1] * MENU_DISPLAY + key + OFFSET_RIFLE new szCmd[STR_T] if( g_iCurrPlayer[id-1] >= 1000 ) format( szCmd, STR_T-1, "uaio_weapon %s %d", g_szVarCmdArgs[g_iCurrPlayer[id-1]-1000], g_iWeaponNum[iOption] ) else format( szCmd, STR_T-1, "uaio_weapon #%d %d", get_user_userid(g_iCurrPlayer[id-1]), g_iWeaponNum[iOption] ) client_cmd( id, szCmd ) } } return PLUGIN_HANDLED } // __________________ //___/ Menu_UAIOExtra() \___________________________________________________________________ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Handles Completion of UAIO Weapons Menu - Extra Weapon Sets //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ public Menu_UAIOExtra( id, key ) { switch( key ) { case 8: { // User Selected "More..." Option UAIO_ExtraMenu( id, ++g_iWeaponMenuPos[id-1] ) } case 9: { // User Chose to go Back to Previous Menu if( g_iWeaponMenuPos[id-1] ) { UAIO_ExtraMenu( id, --g_iWeaponMenuPos[id-1] ) }else { UAIO_WeaponMenu( id ) } } default: { new iOption = g_iWeaponMenuPos[id-1] * MENU_DISPLAY + key + OFFSET_EXTRA new szCmd[STR_T] if( g_iCurrPlayer[id-1] >= 1000 ) format( szCmd, STR_T-1, "uaio_weapon %s %d", g_szVarCmdArgs[g_iCurrPlayer[id-1]-1000], g_iWeaponNum[iOption] ) else format( szCmd, STR_T-1, "uaio_weapon #%d %d", get_user_userid(g_iCurrPlayer[id-1]), g_iWeaponNum[iOption] ) client_cmd( id, szCmd ) } } return PLUGIN_HANDLED } // ______________________________________________ // / UAIO Vote Menu System \_____________ //___/ \ Type: Misc \________________________ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // ___________________ //___/ Menu_UAIOVoting() \__________________________________________________________________ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Handles Individual Player Votes from Vote Menu. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ public Menu_UAIOVoting( id, key ) { new szPlayer[STR_T] get_user_name( id, szPlayer, STR_T-1 ) // Reverse Key key = (key) ? 0 : 1 // Check which option was selected if( get_cvar_num("sv_uaio_vote_answers") ) { new szOption[STR_T] format( szOption, STR_T-1, "%L", LANG_PLAYER, (key)?"EXEC_VOTE_OPT1":"EXEC_VOTE_OPT2" ) client_print( 0, print_chat, "%L", LANG_PLAYER, "EXEC_VOTE_INFO", PLUGIN_MOD, szPlayer, szOption ) } g_iVoteCount[key]++ return PLUGIN_HANDLED }