From ee2ae84d7a0964b8716de8fd8757785e8cce6504 Mon Sep 17 00:00:00 2001 From: Arkshine Date: Sun, 20 Jul 2014 15:15:45 +0200 Subject: [PATCH] Remove MAX_PLAYERS define assocaited to get_players. --- plugins/admin.sma | 4 ++-- plugins/adminchat.sma | 8 ++++---- plugins/admincmd.sma | 12 ++++++------ plugins/adminvote.sma | 2 +- plugins/cstrike/miscstats.sma | 10 +++++----- plugins/cstrike/statsx.sma | 8 ++++---- plugins/dod/plmenu.sma | 2 +- plugins/dod/stats.sma | 10 +++++----- plugins/include/amxmodx.inc | 2 +- plugins/mapsmenu.sma | 4 ++-- plugins/ns/plmenu.sma | 2 +- plugins/plmenu.sma | 2 +- plugins/telemenu.sma | 2 +- plugins/tfc/plmenu.sma | 2 +- plugins/tfc/stats.sma | 6 +++--- plugins/timeleft.sma | 2 +- plugins/ts/stats.sma | 6 +++--- 17 files changed, 42 insertions(+), 42 deletions(-) diff --git a/plugins/admin.sma b/plugins/admin.sma index 19980456..706c72b8 100755 --- a/plugins/admin.sma +++ b/plugins/admin.sma @@ -165,7 +165,7 @@ public addadminfn(id, level, cid) player = cmd_target(id, arg, CMDTARGET_ALLOW_SELF | CMDTARGET_NO_BOTS) } else { new _steamid[44] - static _players[MAX_PLAYERS], _num, _pv + static _players[32], _num, _pv get_players(_players, _num) for (new _i=0; _i<_num; _i++) { @@ -602,7 +602,7 @@ public cmdReload(id, level, cid) } #endif - new players[MAX_PLAYERS], num, pv + new players[32], num, pv new name[MAX_NAME_LENGTH] get_players(players, num) for (new i=0; i<%s><>^" set xvar (name ^"%s^") (value ^"%s^")", name, get_user_userid(id), authid, arg1, arg2); // Display the message to all clients - new players[MAX_PLAYERS], pnum, plr; + new players[32], pnum, plr; get_players(players, pnum, "ch"); for (new i; i=0; pnum--) diff --git a/plugins/cstrike/statsx.sma b/plugins/cstrike/statsx.sma index 642d4ab9..a2961c55 100755 --- a/plugins/cstrike/statsx.sma +++ b/plugins/cstrike/statsx.sma @@ -138,7 +138,7 @@ new g_iPluginMode = 0 new g_izUserMenuPosition[MAX_PLAYERS] = {0, ...} new g_izUserMenuAction[MAX_PLAYERS] = {0, ...} -new g_izUserMenuPlayers[MAX_PLAYERS][MAX_PLAYERS] +new g_izUserMenuPlayers[MAX_PLAYERS][32] new g_izSpecMode[MAX_PLAYERS] = {0, ...} @@ -165,7 +165,7 @@ new g_izTeamRndStats[MAX_TEAMS][8] new g_izTeamGameStats[MAX_TEAMS][8] new g_izUserUserID[MAX_PLAYERS] = {0, ...} new g_izUserAttackerDistance[MAX_PLAYERS] = {0, ...} -new g_izUserVictimDistance[MAX_PLAYERS][MAX_PLAYERS] +new g_izUserVictimDistance[MAX_PLAYERS][32] new g_izUserRndName[MAX_PLAYERS][MAX_NAME_LENGTH + 1] new g_izUserRndStats[MAX_PLAYERS][8] new g_izUserGameStats[MAX_PLAYERS][8] @@ -1580,7 +1580,7 @@ endround_stats() if (g_iRoundEndProcessed || !g_iRoundEndTriggered) return - new iaPlayers[MAX_PLAYERS], iPlayer, iPlayers, id + new iaPlayers[32], iPlayer, iPlayers, id get_players(iaPlayers, iPlayers) @@ -1632,7 +1632,7 @@ public eventIntermission() public end_game_stats() { - new iaPlayers[MAX_PLAYERS], iPlayer, iPlayers, id + new iaPlayers[32], iPlayer, iPlayers, id if (EndPlayer) { diff --git a/plugins/dod/plmenu.sma b/plugins/dod/plmenu.sma index d6af623e..31107e8e 100755 --- a/plugins/dod/plmenu.sma +++ b/plugins/dod/plmenu.sma @@ -37,7 +37,7 @@ #include new g_menuPosition[MAX_PLAYERS] -new g_menuPlayers[MAX_PLAYERS][MAX_PLAYERS] +new g_menuPlayers[MAX_PLAYERS][32] new g_menuPlayersNum[MAX_PLAYERS] new g_menuOption[MAX_PLAYERS] new g_menuSettings[MAX_PLAYERS] diff --git a/plugins/dod/stats.sma b/plugins/dod/stats.sma index e87270ad..ae39ccc8 100755 --- a/plugins/dod/stats.sma +++ b/plugins/dod/stats.sma @@ -67,7 +67,7 @@ new g_RoundScore[2] new g_userPosition[MAX_PLAYERS] new g_userState[MAX_PLAYERS] -new g_userPlayers[MAX_PLAYERS][MAX_PLAYERS] +new g_userPlayers[MAX_PLAYERS][32] new g_Buffer[2048] new g_Killers[MAX_PLAYERS][3] @@ -251,14 +251,14 @@ public cmdFF(id){ public endGameStats(){ new i if ( EndPlayer ){ - new players[MAX_PLAYERS], inum + new players[32], inum get_players(players,inum) for(i = 0; i < inum; ++i){ displayStats_steam(players[i],players[i]) } } else if ( EndTop15 ){ - new players[MAX_PLAYERS], inum + new players[32], inum get_players(players,inum) new g_Top[8], top = get_cvar_num("dodstats_topvalue") @@ -471,7 +471,7 @@ public round_end(){ if ( !EndRoundStats ) return PLUGIN_CONTINUE - new g_Buffer2[1024], len, players[MAX_PLAYERS], pnum, stats[9],bodyhits[8] + new g_Buffer2[1024], len, players[32], pnum, stats[9],bodyhits[8] get_players( players , pnum ) @@ -711,7 +711,7 @@ public client_death(killer,victim,wpnindex,hitplace,TK) if ( headshot && (HeadShotKill || HeadShotKillSound) && !xmod_is_melee_wpn(wpnindex) ){ if ( HeadShotKill ){ - new weapon[32], message[256], players[MAX_PLAYERS], pnum + new weapon[32], message[256], players[32], pnum xmod_get_wpnname(wpnindex,weapon,31) get_players(players,pnum,"c") diff --git a/plugins/include/amxmodx.inc b/plugins/include/amxmodx.inc index 0ecd8cc8..729b4c4e 100755 --- a/plugins/include/amxmodx.inc +++ b/plugins/include/amxmodx.inc @@ -405,7 +405,7 @@ native get_playersnum(flag=0); * "g" - ignore case sensitivity. * "h" - skip HLTV. * Example: Get all alive CTs: get_players(players,num,"ae","CT") */ -native get_players(players[MAX_PLAYERS], &num ,const flags[]="", const team[]=""); +native get_players(players[32], &num ,const flags[]="", const team[]=""); /* Gets argument from command. */ native read_argv(id,output[],len); diff --git a/plugins/mapsmenu.sma b/plugins/mapsmenu.sma index dbc508bf..e67c68b9 100755 --- a/plugins/mapsmenu.sma +++ b/plugins/mapsmenu.sma @@ -118,7 +118,7 @@ public actionResult(id, key) public checkVotes(id) { id -= 34567 - new num, ppl[MAX_PLAYERS], a = 0 + new num, ppl[32], a = 0 get_players(ppl, num, "c") if (num == 0) num = 1 @@ -353,7 +353,7 @@ public actionVoteMapMenu(id, key) set_task(vote_time, "checkVotes", 34567 + id) new menuBody[512] - new players[MAX_PLAYERS] + new players[32] new pnum, keys, len get_players(players, pnum) diff --git a/plugins/ns/plmenu.sma b/plugins/ns/plmenu.sma index 33446847..1dab911c 100644 --- a/plugins/ns/plmenu.sma +++ b/plugins/ns/plmenu.sma @@ -37,7 +37,7 @@ #include new g_menuPosition[MAX_PLAYERS] -new g_menuPlayers[MAX_PLAYERS][MAX_PLAYERS] +new g_menuPlayers[MAX_PLAYERS][32] new g_menuPlayersNum[MAX_PLAYERS] new g_menuOption[MAX_PLAYERS] new g_menuSettings[MAX_PLAYERS] diff --git a/plugins/plmenu.sma b/plugins/plmenu.sma index 41761ba0..8eb4673c 100755 --- a/plugins/plmenu.sma +++ b/plugins/plmenu.sma @@ -41,7 +41,7 @@ #include new g_menuPosition[MAX_PLAYERS] -new g_menuPlayers[MAX_PLAYERS][MAX_PLAYERS] +new g_menuPlayers[MAX_PLAYERS][32] new g_menuPlayersNum[MAX_PLAYERS] new g_menuOption[MAX_PLAYERS] new g_menuSettings[MAX_PLAYERS] diff --git a/plugins/telemenu.sma b/plugins/telemenu.sma index 171d5e3b..93ddabd3 100755 --- a/plugins/telemenu.sma +++ b/plugins/telemenu.sma @@ -38,7 +38,7 @@ #define MAX_PLAYERS 32 + 1 new g_menuPosition[MAX_PLAYERS] -new g_menuPlayers[MAX_PLAYERS][MAX_PLAYERS] +new g_menuPlayers[MAX_PLAYERS][32] new g_menuPlayersNum[MAX_PLAYERS] new g_menuOption[MAX_PLAYERS] = {-1, ...} new Float:g_menuOrigin[MAX_PLAYERS][3] diff --git a/plugins/tfc/plmenu.sma b/plugins/tfc/plmenu.sma index b5bfc7ce..488bec26 100755 --- a/plugins/tfc/plmenu.sma +++ b/plugins/tfc/plmenu.sma @@ -37,7 +37,7 @@ #include new g_menuPosition[MAX_PLAYERS] -new g_menuPlayers[MAX_PLAYERS][MAX_PLAYERS] +new g_menuPlayers[MAX_PLAYERS][32] new g_menuPlayersNum[MAX_PLAYERS] new g_menuOption[MAX_PLAYERS] new g_menuSettings[MAX_PLAYERS] diff --git a/plugins/tfc/stats.sma b/plugins/tfc/stats.sma index d180f741..7f61e723 100755 --- a/plugins/tfc/stats.sma +++ b/plugins/tfc/stats.sma @@ -55,7 +55,7 @@ new g_KillCount; new g_userPosition[MAX_PLAYERS] new g_userState[MAX_PLAYERS] -new g_userPlayers[MAX_PLAYERS][MAX_PLAYERS] +new g_userPlayers[MAX_PLAYERS][32] new g_Buffer[2048] @@ -278,14 +278,14 @@ getTop15(){ public endGameStats(){ if ( EndPlayer ){ - new players[MAX_PLAYERS], inum + new players[32], inum get_players(players,inum) for(new i = 0; i < inum; ++i){ displayStats(players[i],players[i]) } } else if ( EndTop15 ){ - new players[MAX_PLAYERS], inum + new players[32], inum get_players(players,inum) getTop15() for(new i = 0; i < inum; ++i) diff --git a/plugins/timeleft.sma b/plugins/timeleft.sma index dd9339a9..5c67c58e 100755 --- a/plugins/timeleft.sma +++ b/plugins/timeleft.sma @@ -266,7 +266,7 @@ public timeRemain(param[]) if (flags & TD_BOTTOM_WHITE_TEXT) { - new players[MAX_PLAYERS], pnum, plr + new players[32], pnum, plr get_players(players, pnum, "c") diff --git a/plugins/ts/stats.sma b/plugins/ts/stats.sma index 6bf48ab9..7e58ce89 100755 --- a/plugins/ts/stats.sma +++ b/plugins/ts/stats.sma @@ -51,7 +51,7 @@ public FragInfo new g_userPosition[MAX_PLAYERS] new g_userState[MAX_PLAYERS] -new g_userPlayers[MAX_PLAYERS][MAX_PLAYERS] +new g_userPlayers[MAX_PLAYERS][32] new g_Buffer[2048] new g_Killers[MAX_PLAYERS][3] new Float:g_DeathStats[MAX_PLAYERS] @@ -223,13 +223,13 @@ getTop15(){ public endGameStats(){ if ( EndPlayer ){ - new players[MAX_PLAYERS], inum + new players[32], inum get_players(players,inum) for(new i = 0; i < inum; ++i) displayStats(players[i],players[i]) } else if ( EndTop15 ) { - new players[MAX_PLAYERS], inum + new players[32], inum get_players(players,inum) getTop15() for(new i = 0; i < inum; ++i)