MAX_PLAYERS: Fix plugins
This commit is contained in:
@ -57,8 +57,8 @@ public GrenadeSuicideSound
|
||||
const SOUNDFILE_PATH_MAXLEN = 64
|
||||
const SOUND_SHORTPATH_MAXLEN = SOUNDFILE_PATH_MAXLEN - 10 // 64 (sound/ [ 54 ] .wav) critical value for fast dl
|
||||
|
||||
new g_streakKills[MAX_PLAYERS][2]
|
||||
new g_multiKills[MAX_PLAYERS][2]
|
||||
new g_streakKills[MAX_PLAYERS + 1][2]
|
||||
new g_multiKills[MAX_PLAYERS + 1][2]
|
||||
new g_C4Timer
|
||||
new g_Defusing
|
||||
new g_Planter
|
||||
@ -67,7 +67,7 @@ new g_LastAnnounce
|
||||
new g_roundCount
|
||||
new Float:g_doubleKill
|
||||
new g_doubleKillId
|
||||
new g_friend[MAX_PLAYERS]
|
||||
new g_friend[MAX_PLAYERS + 1]
|
||||
new g_firstBlood
|
||||
new g_center1_sync
|
||||
new g_announce_sync
|
||||
@ -84,8 +84,8 @@ const TASK_DELAYED_NEW_ROUND = 98038
|
||||
const TEAM_T = 1
|
||||
const TEAM_CT = 2
|
||||
|
||||
new g_connected[MAX_PLAYERS]
|
||||
new g_msounds[MAX_PLAYERS]
|
||||
new g_connected[MAX_PLAYERS + 1]
|
||||
new g_msounds[MAX_PLAYERS + 1]
|
||||
new const _msound[] = "_msound"
|
||||
|
||||
new g_MultiKillMsg[7][] =
|
||||
@ -548,7 +548,7 @@ public client_death(killer, victim, wpnindex, hitplace, TK)
|
||||
{
|
||||
if( TEAM_T <= team <= TEAM_CT )
|
||||
{
|
||||
new ppl[32], pplnum, epplnum, a
|
||||
new ppl[MAX_PLAYERS], pplnum, epplnum, a
|
||||
get_players(ppl, epplnum, "ae", team == TEAM_T ? "CT" : "TERRORIST")
|
||||
get_players(ppl, pplnum, "ae", team == TEAM_T ? "TERRORIST" : "CT")
|
||||
if( victim_alive )
|
||||
@ -592,7 +592,7 @@ public client_death(killer, victim, wpnindex, hitplace, TK)
|
||||
|
||||
if (LastMan || LastManSound)
|
||||
{
|
||||
new cts[32], ts[32], ctsnum, tsnum, b
|
||||
new cts[MAX_PLAYERS], ts[MAX_PLAYERS], ctsnum, tsnum, b
|
||||
get_players(cts, ctsnum, "ae", "CT")
|
||||
get_players(ts, tsnum, "ae", "TERRORIST")
|
||||
|
||||
@ -744,7 +744,7 @@ public client_death(killer, victim, wpnindex, hitplace, TK)
|
||||
{
|
||||
if (HeadShotKill && wpnindex)
|
||||
{
|
||||
new killer_name[MAX_NAME_LENGTH], victim_name[MAX_NAME_LENGTH], weapon_name[32], message[256], players[32], pnum, plr
|
||||
new killer_name[MAX_NAME_LENGTH], victim_name[MAX_NAME_LENGTH], weapon_name[32], message[256], players[MAX_PLAYERS], pnum, plr
|
||||
|
||||
xmod_get_wpnname(wpnindex, weapon_name, charsmax(weapon_name))
|
||||
get_user_name(killer, killer_name, charsmax(killer_name))
|
||||
@ -866,7 +866,7 @@ public LogEvent_Round_Start()
|
||||
{
|
||||
if (KillingStreak)
|
||||
{
|
||||
new appl[32], ppl, i
|
||||
new appl[MAX_PLAYERS], ppl, i
|
||||
get_players(appl, ppl, "ac")
|
||||
|
||||
for (new a = 0; a < ppl; ++a)
|
||||
@ -1088,7 +1088,7 @@ play_sound(id, sound[])
|
||||
}
|
||||
else
|
||||
{
|
||||
new players[32], pnum, id
|
||||
new players[MAX_PLAYERS], pnum, id
|
||||
get_players(players, pnum, "ch")
|
||||
|
||||
for(--pnum; pnum>=0; pnum--)
|
||||
|
@ -19,14 +19,14 @@
|
||||
|
||||
#define MAXMENUPOS 34
|
||||
|
||||
new g_Position[MAX_PLAYERS]
|
||||
new g_Position[MAX_PLAYERS + 1]
|
||||
new g_Modified
|
||||
new g_blockPos[112]
|
||||
new g_saveFile[64]
|
||||
new g_Restricted[] = "* This item is restricted *"
|
||||
new g_szWeapRestr[27] = "00000000000000000000000000"
|
||||
new g_szEquipAmmoRestr[10] = "000000000"
|
||||
new g_InBuyMenu[MAX_PLAYERS]
|
||||
new g_InBuyMenu[MAX_PLAYERS + 1]
|
||||
new g_RegisteredMenus[10]
|
||||
|
||||
new g_menuStrings[6][] =
|
||||
@ -283,8 +283,8 @@ new g_Aliases2[MAXMENUPOS][] =
|
||||
}
|
||||
|
||||
#define AUTOBUYLENGTH 511
|
||||
new g_Autobuy[MAX_PLAYERS][AUTOBUYLENGTH + 1]
|
||||
//new g_Rebuy[MAX_PLAYERS][AUTOBUYLENGTH + 1]
|
||||
new g_Autobuy[MAX_PLAYERS + 1][AUTOBUYLENGTH + 1]
|
||||
//new g_Rebuy[MAX_PLAYERS + 1][AUTOBUYLENGTH + 1]
|
||||
|
||||
bool:IsOurMenuID(id)
|
||||
{
|
||||
|
@ -14,9 +14,9 @@
|
||||
#include <amxmodx>
|
||||
#include <csx>
|
||||
|
||||
new g_pingSum[MAX_PLAYERS]
|
||||
new g_pingCount[MAX_PLAYERS]
|
||||
new g_inGame[MAX_PLAYERS]
|
||||
new g_pingSum[MAX_PLAYERS + 1]
|
||||
new g_pingCount[MAX_PLAYERS + 1]
|
||||
new g_inGame[MAX_PLAYERS + 1]
|
||||
|
||||
public plugin_init()
|
||||
{
|
||||
|
@ -107,56 +107,56 @@ new BODY_PART[8][] =
|
||||
#define KILLED_TEAM 3 // Killer's team
|
||||
#define KILLED_KILLER_STATSFIX 4 // Fix to register the last hit/kill
|
||||
|
||||
new g_izKilled[MAX_PLAYERS][5]
|
||||
new g_izKilled[MAX_PLAYERS + 1][5]
|
||||
|
||||
// Menu variables and configuration
|
||||
#define MAX_PPL_MENU_ACTIONS 2 // Number of player menu actions
|
||||
#define PPL_MENU_OPTIONS 7 // Number of player options per displayed menu
|
||||
|
||||
new g_iPluginMode = 0
|
||||
new g_iPluginMode = 0
|
||||
|
||||
new g_izUserMenuPosition[MAX_PLAYERS] = {0, ...}
|
||||
new g_izUserMenuAction[MAX_PLAYERS] = {0, ...}
|
||||
new g_izUserMenuPlayers[MAX_PLAYERS][32]
|
||||
new g_izUserMenuPosition[MAX_PLAYERS + 1] = {0, ...}
|
||||
new g_izUserMenuAction[MAX_PLAYERS + 1] = {0, ...}
|
||||
new g_izUserMenuPlayers[MAX_PLAYERS + 1][32]
|
||||
|
||||
new g_izSpecMode[MAX_PLAYERS] = {0, ...}
|
||||
new g_izSpecMode[MAX_PLAYERS + 1] = {0, ...}
|
||||
|
||||
new g_izShowStatsFlags[MAX_PLAYERS] = {0, ...}
|
||||
new g_izStatsSwitch[MAX_PLAYERS] = {0, ...}
|
||||
new Float:g_fzShowUserStatsTime[MAX_PLAYERS] = {0.0, ...}
|
||||
new Float:g_fShowStatsTime = 0.0
|
||||
new Float:g_fFreezeTime = 0.0
|
||||
new Float:g_fFreezeLimitTime = 0.0
|
||||
new Float:g_fHUDDuration = 0.0
|
||||
new g_izShowStatsFlags[MAX_PLAYERS + 1] = {0, ...}
|
||||
new g_izStatsSwitch[MAX_PLAYERS + 1] = {0, ...}
|
||||
new Float:g_fzShowUserStatsTime[MAX_PLAYERS + 1] = {0.0, ...}
|
||||
new Float:g_fShowStatsTime = 0.0
|
||||
new Float:g_fFreezeTime = 0.0
|
||||
new Float:g_fFreezeLimitTime = 0.0
|
||||
new Float:g_fHUDDuration = 0.0
|
||||
|
||||
new g_iRoundEndTriggered = 0
|
||||
new g_iRoundEndProcessed = 0
|
||||
new g_iRoundEndTriggered = 0
|
||||
new g_iRoundEndProcessed = 0
|
||||
|
||||
new g_pFreezeTime = 0
|
||||
new g_pRoundTime = 0
|
||||
new g_pHudDuration = 0
|
||||
new g_pHudFreezeLimit = 0
|
||||
new g_pFreezeTime = 0
|
||||
new g_pRoundTime = 0
|
||||
new g_pHudDuration = 0
|
||||
new g_pHudFreezeLimit = 0
|
||||
|
||||
new Float:g_fStartGame = 0.0
|
||||
new g_izTeamScore[MAX_TEAMS] = {0, ...}
|
||||
new g_izTeamEventScore[MAX_TEAMS] = {0, ...}
|
||||
new Float:g_fStartGame = 0.0
|
||||
new g_izTeamScore[MAX_TEAMS] = {0, ...}
|
||||
new g_izTeamEventScore[MAX_TEAMS] = {0, ...}
|
||||
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_izUserRndName[MAX_PLAYERS][MAX_NAME_LENGTH]
|
||||
new g_izUserRndStats[MAX_PLAYERS][8]
|
||||
new g_izUserGameStats[MAX_PLAYERS][8]
|
||||
new g_izUserUserID[MAX_PLAYERS + 1] = {0, ...}
|
||||
new g_izUserAttackerDistance[MAX_PLAYERS + 1] = {0, ...}
|
||||
new g_izUserVictimDistance[MAX_PLAYERS + 1][MAX_PLAYERS + 1]
|
||||
new g_izUserRndName[MAX_PLAYERS + 1][MAX_NAME_LENGTH]
|
||||
new g_izUserRndStats[MAX_PLAYERS + 1][8]
|
||||
new g_izUserGameStats[MAX_PLAYERS + 1][8]
|
||||
|
||||
// Common buffer to improve performance, as Small always zero-initializes all vars
|
||||
new g_sBuffer[MAX_BUFFER_LENGTH + 1] = ""
|
||||
new g_sScore[MAX_TEXT_LENGTH + 1] = ""
|
||||
new g_sAwardAndScore[MAX_BUFFER_LENGTH + 1] = ""
|
||||
new g_sBuffer[MAX_BUFFER_LENGTH + 1] = ""
|
||||
new g_sScore[MAX_TEXT_LENGTH + 1] = ""
|
||||
new g_sAwardAndScore[MAX_BUFFER_LENGTH + 1] = ""
|
||||
|
||||
new t_sText[MAX_TEXT_LENGTH + 1] = ""
|
||||
new t_sName[MAX_NAME_LENGTH + 1] = ""
|
||||
new t_sWpn[MAX_WEAPON_LENGTH + 1] = ""
|
||||
new t_sText[MAX_TEXT_LENGTH + 1] = ""
|
||||
new t_sName[MAX_NAME_LENGTH + 1] = ""
|
||||
new t_sWpn[MAX_WEAPON_LENGTH + 1] = ""
|
||||
|
||||
new g_HudSync_EndRound
|
||||
new g_HudSync_SpecInfo
|
||||
@ -1547,7 +1547,7 @@ endround_stats()
|
||||
if (g_iRoundEndProcessed || !g_iRoundEndTriggered)
|
||||
return
|
||||
|
||||
new iaPlayers[32], iPlayer, iPlayers, id
|
||||
new iaPlayers[MAX_PLAYERS], iPlayer, iPlayers, id
|
||||
|
||||
get_players(iaPlayers, iPlayers)
|
||||
|
||||
@ -1599,7 +1599,7 @@ public eventIntermission()
|
||||
|
||||
public end_game_stats()
|
||||
{
|
||||
new iaPlayers[32], iPlayer, iPlayers, id
|
||||
new iaPlayers[MAX_PLAYERS], iPlayer, iPlayers, id
|
||||
|
||||
if (EndPlayer)
|
||||
{
|
||||
|
Reference in New Issue
Block a user