Remove MAX_PLAYERS define assocaited to get_players.

This commit is contained in:
Arkshine 2014-07-20 15:15:45 +02:00
parent 7b96b4df22
commit ee2ae84d7a
17 changed files with 42 additions and 42 deletions

View File

@ -165,7 +165,7 @@ public addadminfn(id, level, cid)
player = cmd_target(id, arg, CMDTARGET_ALLOW_SELF | CMDTARGET_NO_BOTS) player = cmd_target(id, arg, CMDTARGET_ALLOW_SELF | CMDTARGET_NO_BOTS)
} else { } else {
new _steamid[44] new _steamid[44]
static _players[MAX_PLAYERS], _num, _pv static _players[32], _num, _pv
get_players(_players, _num) get_players(_players, _num)
for (new _i=0; _i<_num; _i++) for (new _i=0; _i<_num; _i++)
{ {
@ -602,7 +602,7 @@ public cmdReload(id, level, cid)
} }
#endif #endif
new players[MAX_PLAYERS], num, pv new players[32], num, pv
new name[MAX_NAME_LENGTH] new name[MAX_NAME_LENGTH]
get_players(players, num) get_players(players, num)
for (new i=0; i<num; i++) for (new i=0; i<num; i++)

View File

@ -160,7 +160,7 @@ public cmdSayChat(id, level)
{ {
case 3, 4: case 3, 4:
{ {
new players[MAX_PLAYERS], plrsnum, pl new players[32], plrsnum, pl
get_players(players, plrsnum, "ch") get_players(players, plrsnum, "ch")
for(new j; j<plrsnum; j++) for(new j; j<plrsnum; j++)
{ {
@ -226,7 +226,7 @@ public cmdSayAdmin(id)
} }
new message[192], name[MAX_NAME_LENGTH], authid[32], userid new message[192], name[MAX_NAME_LENGTH], authid[32], userid
new players[MAX_PLAYERS], inum, pl new players[32], inum, pl
read_args(message, charsmax(message)) read_args(message, charsmax(message))
remove_quotes(message) remove_quotes(message)
@ -267,7 +267,7 @@ public cmdChat(id, level, cid)
if (!message[0]) if (!message[0])
return PLUGIN_HANDLED return PLUGIN_HANDLED
new name[MAX_NAME_LENGTH], players[MAX_PLAYERS], inum, authid[32], userid, pl new name[MAX_NAME_LENGTH], players[32], inum, authid[32], userid, pl
get_user_authid(id, authid, charsmax(authid)) get_user_authid(id, authid, charsmax(authid))
get_user_name(id, name, charsmax(name)) get_user_name(id, name, charsmax(name))
@ -407,7 +407,7 @@ public cmdTsay(id, level, cid)
{ {
case 3, 4: case 3, 4:
{ {
new players[MAX_PLAYERS], plrsnum, pl new players[32], plrsnum, pl
get_players(players, plrsnum, "ch") get_players(players, plrsnum, "ch")
for(new i; i<plrsnum; i++) for(new i; i<plrsnum; i++)
{ {

View File

@ -485,7 +485,7 @@ public cmdBan(id, level, cid)
new msg[256]; new msg[256];
new len; new len;
new players[MAX_PLAYERS], pnum, plr new players[32], pnum, plr
get_players(players, pnum, "ch") get_players(players, pnum, "ch")
for (new i; i<pnum; i++) for (new i; i<pnum; i++)
{ {
@ -572,7 +572,7 @@ public cmdBanIP(id, level, cid)
new msg[256]; new msg[256];
new len; new len;
new players[MAX_PLAYERS], pnum, plr new players[32], pnum, plr
get_players(players, pnum, "ch") get_players(players, pnum, "ch")
for (new i; i<pnum; i++) for (new i; i<pnum; i++)
{ {
@ -810,7 +810,7 @@ public cmdCvar(id, level, cid)
// Display the message to all clients // Display the message to all clients
new cvar_val[64]; new cvar_val[64];
new players[MAX_PLAYERS], pnum, plr new players[32], pnum, plr
get_players(players, pnum, "ch") get_players(players, pnum, "ch")
for (new i; i<pnum; i++) for (new i; i<pnum; i++)
{ {
@ -934,7 +934,7 @@ public cmdXvar(id, level, cid)
log_amx("Cmd: ^"%s<%d><%s><>^" set xvar (name ^"%s^") (value ^"%s^")", name, get_user_userid(id), authid, arg1, arg2); log_amx("Cmd: ^"%s<%d><%s><>^" set xvar (name ^"%s^") (value ^"%s^")", name, get_user_userid(id), authid, arg1, arg2);
// Display the message to all clients // Display the message to all clients
new players[MAX_PLAYERS], pnum, plr; new players[32], pnum, plr;
get_players(players, pnum, "ch"); get_players(players, pnum, "ch");
for (new i; i<pnum; i++) for (new i; i<pnum; i++)
{ {
@ -1139,7 +1139,7 @@ public cmdPause(id, level, cid)
// Display the message to all clients // Display the message to all clients
new players[MAX_PLAYERS], pnum new players[32], pnum
get_players(players, pnum, "ch") get_players(players, pnum, "ch")
for (new i; i<pnum; i++) for (new i; i<pnum; i++)
{ {
@ -1198,7 +1198,7 @@ public cmdWho(id, level, cid)
if (!cmd_access(id, level, cid, 1)) if (!cmd_access(id, level, cid, 1))
return PLUGIN_HANDLED return PLUGIN_HANDLED
new players[MAX_PLAYERS], inum, cl_on_server[64], authid[32], name[MAX_NAME_LENGTH], flags, sflags[32], plr new players[32], inum, cl_on_server[64], authid[32], name[MAX_NAME_LENGTH], flags, sflags[32], plr
new lImm[16], lRes[16], lAccess[16], lYes[16], lNo[16] new lImm[16], lRes[16], lAccess[16], lYes[16], lNo[16]
formatex(lImm, charsmax(lImm), "%L", id, "IMMU") formatex(lImm, charsmax(lImm), "%L", id, "IMMU")

View File

@ -150,7 +150,7 @@ public checkVotes()
new votesNum = g_voteCount[0] + g_voteCount[1] + g_voteCount[2] + g_voteCount[3] new votesNum = g_voteCount[0] + g_voteCount[1] + g_voteCount[2] + g_voteCount[3]
new iRatio = votesNum ? floatround(g_voteRatio * float(votesNum), floatround_ceil) : 1 new iRatio = votesNum ? floatround(g_voteRatio * float(votesNum), floatround_ceil) : 1
new iResult = g_voteCount[best] new iResult = g_voteCount[best]
new players[MAX_PLAYERS], pnum, i new players[32], pnum, i
get_players(players, pnum, "c") get_players(players, pnum, "c")

View File

@ -567,7 +567,7 @@ public client_death(killer, victim, wpnindex, hitplace, TK)
{ {
if( TEAM_T <= team <= TEAM_CT ) if( TEAM_T <= team <= TEAM_CT )
{ {
new ppl[MAX_PLAYERS], pplnum, epplnum, a new ppl[32], pplnum, epplnum, a
get_players(ppl, epplnum, "ae", team == TEAM_T ? "CT" : "TERRORIST") get_players(ppl, epplnum, "ae", team == TEAM_T ? "CT" : "TERRORIST")
get_players(ppl, pplnum, "ae", team == TEAM_T ? "TERRORIST" : "CT") get_players(ppl, pplnum, "ae", team == TEAM_T ? "TERRORIST" : "CT")
if( victim_alive ) if( victim_alive )
@ -611,7 +611,7 @@ public client_death(killer, victim, wpnindex, hitplace, TK)
if (LastMan || LastManSound) if (LastMan || LastManSound)
{ {
new cts[MAX_PLAYERS], ts[MAX_PLAYERS], ctsnum, tsnum, b new cts[32], ts[32], ctsnum, tsnum, b
get_players(cts, ctsnum, "ae", "CT") get_players(cts, ctsnum, "ae", "CT")
get_players(ts, tsnum, "ae", "TERRORIST") get_players(ts, tsnum, "ae", "TERRORIST")
@ -744,7 +744,7 @@ public client_death(killer, victim, wpnindex, hitplace, TK)
{ {
if (HeadShotKill && wpnindex) if (HeadShotKill && wpnindex)
{ {
new killer_name[MAX_NAME_LENGTH], victim_name[MAX_NAME_LENGTH], weapon_name[32], message[256], players[MAX_PLAYERS], pnum, plr new killer_name[MAX_NAME_LENGTH], victim_name[MAX_NAME_LENGTH], weapon_name[32], message[256], players[32], pnum, plr
xmod_get_wpnname(wpnindex, weapon_name, charsmax(weapon_name)) xmod_get_wpnname(wpnindex, weapon_name, charsmax(weapon_name))
get_user_name(killer, killer_name, charsmax(killer_name)) get_user_name(killer, killer_name, charsmax(killer_name))
@ -866,7 +866,7 @@ public LogEvent_Round_Start()
{ {
if (KillingStreak) if (KillingStreak)
{ {
new appl[MAX_PLAYERS], ppl, i new appl[32], ppl, i
get_players(appl, ppl, "ac") get_players(appl, ppl, "ac")
for (new a = 0; a < ppl; ++a) for (new a = 0; a < ppl; ++a)
@ -1088,7 +1088,7 @@ play_sound(id, sound[])
} }
else else
{ {
new players[MAX_PLAYERS], pnum, id new players[32], pnum, id
get_players(players, pnum, "ch") get_players(players, pnum, "ch")
for(--pnum; pnum>=0; pnum--) for(--pnum; pnum>=0; pnum--)

View File

@ -138,7 +138,7 @@ new g_iPluginMode = 0
new g_izUserMenuPosition[MAX_PLAYERS] = {0, ...} new g_izUserMenuPosition[MAX_PLAYERS] = {0, ...}
new g_izUserMenuAction[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, ...} new g_izSpecMode[MAX_PLAYERS] = {0, ...}
@ -165,7 +165,7 @@ new g_izTeamRndStats[MAX_TEAMS][8]
new g_izTeamGameStats[MAX_TEAMS][8] new g_izTeamGameStats[MAX_TEAMS][8]
new g_izUserUserID[MAX_PLAYERS] = {0, ...} new g_izUserUserID[MAX_PLAYERS] = {0, ...}
new g_izUserAttackerDistance[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_izUserRndName[MAX_PLAYERS][MAX_NAME_LENGTH + 1]
new g_izUserRndStats[MAX_PLAYERS][8] new g_izUserRndStats[MAX_PLAYERS][8]
new g_izUserGameStats[MAX_PLAYERS][8] new g_izUserGameStats[MAX_PLAYERS][8]
@ -1580,7 +1580,7 @@ endround_stats()
if (g_iRoundEndProcessed || !g_iRoundEndTriggered) if (g_iRoundEndProcessed || !g_iRoundEndTriggered)
return return
new iaPlayers[MAX_PLAYERS], iPlayer, iPlayers, id new iaPlayers[32], iPlayer, iPlayers, id
get_players(iaPlayers, iPlayers) get_players(iaPlayers, iPlayers)
@ -1632,7 +1632,7 @@ public eventIntermission()
public end_game_stats() public end_game_stats()
{ {
new iaPlayers[MAX_PLAYERS], iPlayer, iPlayers, id new iaPlayers[32], iPlayer, iPlayers, id
if (EndPlayer) if (EndPlayer)
{ {

View File

@ -37,7 +37,7 @@
#include <dodx> #include <dodx>
new g_menuPosition[MAX_PLAYERS] 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_menuPlayersNum[MAX_PLAYERS]
new g_menuOption[MAX_PLAYERS] new g_menuOption[MAX_PLAYERS]
new g_menuSettings[MAX_PLAYERS] new g_menuSettings[MAX_PLAYERS]

View File

@ -67,7 +67,7 @@ new g_RoundScore[2]
new g_userPosition[MAX_PLAYERS] new g_userPosition[MAX_PLAYERS]
new g_userState[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_Buffer[2048]
new g_Killers[MAX_PLAYERS][3] new g_Killers[MAX_PLAYERS][3]
@ -251,14 +251,14 @@ public cmdFF(id){
public endGameStats(){ public endGameStats(){
new i new i
if ( EndPlayer ){ if ( EndPlayer ){
new players[MAX_PLAYERS], inum new players[32], inum
get_players(players,inum) get_players(players,inum)
for(i = 0; i < inum; ++i){ for(i = 0; i < inum; ++i){
displayStats_steam(players[i],players[i]) displayStats_steam(players[i],players[i])
} }
} }
else if ( EndTop15 ){ else if ( EndTop15 ){
new players[MAX_PLAYERS], inum new players[32], inum
get_players(players,inum) get_players(players,inum)
new g_Top[8], top = get_cvar_num("dodstats_topvalue") new g_Top[8], top = get_cvar_num("dodstats_topvalue")
@ -471,7 +471,7 @@ public round_end(){
if ( !EndRoundStats ) return PLUGIN_CONTINUE 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 ) 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 ( headshot && (HeadShotKill || HeadShotKillSound) && !xmod_is_melee_wpn(wpnindex) ){
if ( HeadShotKill ){ 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) xmod_get_wpnname(wpnindex,weapon,31)
get_players(players,pnum,"c") get_players(players,pnum,"c")

View File

@ -405,7 +405,7 @@ native get_playersnum(flag=0);
* "g" - ignore case sensitivity. * "g" - ignore case sensitivity.
* "h" - skip HLTV. * "h" - skip HLTV.
* Example: Get all alive CTs: get_players(players,num,"ae","CT") */ * 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. */ /* Gets argument from command. */
native read_argv(id,output[],len); native read_argv(id,output[],len);

View File

@ -118,7 +118,7 @@ public actionResult(id, key)
public checkVotes(id) public checkVotes(id)
{ {
id -= 34567 id -= 34567
new num, ppl[MAX_PLAYERS], a = 0 new num, ppl[32], a = 0
get_players(ppl, num, "c") get_players(ppl, num, "c")
if (num == 0) num = 1 if (num == 0) num = 1
@ -353,7 +353,7 @@ public actionVoteMapMenu(id, key)
set_task(vote_time, "checkVotes", 34567 + id) set_task(vote_time, "checkVotes", 34567 + id)
new menuBody[512] new menuBody[512]
new players[MAX_PLAYERS] new players[32]
new pnum, keys, len new pnum, keys, len
get_players(players, pnum) get_players(players, pnum)

View File

@ -37,7 +37,7 @@
#include <ns> #include <ns>
new g_menuPosition[MAX_PLAYERS] 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_menuPlayersNum[MAX_PLAYERS]
new g_menuOption[MAX_PLAYERS] new g_menuOption[MAX_PLAYERS]
new g_menuSettings[MAX_PLAYERS] new g_menuSettings[MAX_PLAYERS]

View File

@ -41,7 +41,7 @@
#include <fakemeta> #include <fakemeta>
new g_menuPosition[MAX_PLAYERS] 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_menuPlayersNum[MAX_PLAYERS]
new g_menuOption[MAX_PLAYERS] new g_menuOption[MAX_PLAYERS]
new g_menuSettings[MAX_PLAYERS] new g_menuSettings[MAX_PLAYERS]

View File

@ -38,7 +38,7 @@
#define MAX_PLAYERS 32 + 1 #define MAX_PLAYERS 32 + 1
new g_menuPosition[MAX_PLAYERS] 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_menuPlayersNum[MAX_PLAYERS]
new g_menuOption[MAX_PLAYERS] = {-1, ...} new g_menuOption[MAX_PLAYERS] = {-1, ...}
new Float:g_menuOrigin[MAX_PLAYERS][3] new Float:g_menuOrigin[MAX_PLAYERS][3]

View File

@ -37,7 +37,7 @@
#include <tfcx> #include <tfcx>
new g_menuPosition[MAX_PLAYERS] 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_menuPlayersNum[MAX_PLAYERS]
new g_menuOption[MAX_PLAYERS] new g_menuOption[MAX_PLAYERS]
new g_menuSettings[MAX_PLAYERS] new g_menuSettings[MAX_PLAYERS]

View File

@ -55,7 +55,7 @@ new g_KillCount;
new g_userPosition[MAX_PLAYERS] new g_userPosition[MAX_PLAYERS]
new g_userState[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_Buffer[2048]
@ -278,14 +278,14 @@ getTop15(){
public endGameStats(){ public endGameStats(){
if ( EndPlayer ){ if ( EndPlayer ){
new players[MAX_PLAYERS], inum new players[32], inum
get_players(players,inum) get_players(players,inum)
for(new i = 0; i < inum; ++i){ for(new i = 0; i < inum; ++i){
displayStats(players[i],players[i]) displayStats(players[i],players[i])
} }
} }
else if ( EndTop15 ){ else if ( EndTop15 ){
new players[MAX_PLAYERS], inum new players[32], inum
get_players(players,inum) get_players(players,inum)
getTop15() getTop15()
for(new i = 0; i < inum; ++i) for(new i = 0; i < inum; ++i)

View File

@ -266,7 +266,7 @@ public timeRemain(param[])
if (flags & TD_BOTTOM_WHITE_TEXT) if (flags & TD_BOTTOM_WHITE_TEXT)
{ {
new players[MAX_PLAYERS], pnum, plr new players[32], pnum, plr
get_players(players, pnum, "c") get_players(players, pnum, "c")

View File

@ -51,7 +51,7 @@ public FragInfo
new g_userPosition[MAX_PLAYERS] new g_userPosition[MAX_PLAYERS]
new g_userState[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_Buffer[2048]
new g_Killers[MAX_PLAYERS][3] new g_Killers[MAX_PLAYERS][3]
new Float:g_DeathStats[MAX_PLAYERS] new Float:g_DeathStats[MAX_PLAYERS]
@ -223,13 +223,13 @@ getTop15(){
public endGameStats(){ public endGameStats(){
if ( EndPlayer ){ if ( EndPlayer ){
new players[MAX_PLAYERS], inum new players[32], inum
get_players(players,inum) get_players(players,inum)
for(new i = 0; i < inum; ++i) for(new i = 0; i < inum; ++i)
displayStats(players[i],players[i]) displayStats(players[i],players[i])
} }
else if ( EndTop15 ) { else if ( EndTop15 ) {
new players[MAX_PLAYERS], inum new players[32], inum
get_players(players,inum) get_players(players,inum)
getTop15() getTop15()
for(new i = 0; i < inum; ++i) for(new i = 0; i < inum; ++i)