Use the new constants in various place.
This commit is contained in:
@ -77,8 +77,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[33][2]
|
||||
new g_multiKills[33][2]
|
||||
new g_streakKills[MAX_PLAYERS][2]
|
||||
new g_multiKills[MAX_PLAYERS][2]
|
||||
new g_C4Timer
|
||||
new g_Defusing
|
||||
new g_Planter
|
||||
@ -87,7 +87,7 @@ new g_LastAnnounce
|
||||
new g_roundCount
|
||||
new Float:g_doubleKill
|
||||
new g_doubleKillId
|
||||
new g_friend[33]
|
||||
new g_friend[MAX_PLAYERS]
|
||||
new g_firstBlood
|
||||
new g_center1_sync
|
||||
new g_announce_sync
|
||||
@ -104,8 +104,8 @@ const TASK_DELAYED_NEW_ROUND = 98038
|
||||
const TEAM_T = 1
|
||||
const TEAM_CT = 2
|
||||
|
||||
new g_connected[33]
|
||||
new g_msounds[33]
|
||||
new g_connected[MAX_PLAYERS]
|
||||
new g_msounds[MAX_PLAYERS]
|
||||
new const _msound[] = "_msound"
|
||||
|
||||
new g_MultiKillMsg[7][] =
|
||||
@ -527,7 +527,7 @@ public client_death(killer, victim, wpnindex, hitplace, TK)
|
||||
|
||||
if ((a > -1) && !(a % 2))
|
||||
{
|
||||
new name[32]
|
||||
new name[MAX_NAME_LENGTH]
|
||||
get_user_name(killer, name, charsmax(name))
|
||||
|
||||
if ((a >>= 1) > 6)
|
||||
@ -567,7 +567,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 )
|
||||
@ -611,7 +611,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")
|
||||
|
||||
@ -648,7 +648,7 @@ public client_death(killer, victim, wpnindex, hitplace, TK)
|
||||
{
|
||||
if( LastMan )
|
||||
{
|
||||
new ctname[32], tname[32]
|
||||
new ctname[MAX_NAME_LENGTH], tname[MAX_NAME_LENGTH]
|
||||
|
||||
get_user_name(cts[0], ctname, charsmax(ctname))
|
||||
get_user_name(ts[0], tname, charsmax(tname))
|
||||
@ -681,7 +681,7 @@ public client_death(killer, victim, wpnindex, hitplace, TK)
|
||||
{
|
||||
if( LastMan )
|
||||
{
|
||||
new name[32]
|
||||
new name[MAX_NAME_LENGTH]
|
||||
|
||||
get_user_name(g_LastAnnounce, name, charsmax(name))
|
||||
|
||||
@ -700,7 +700,7 @@ public client_death(killer, victim, wpnindex, hitplace, TK)
|
||||
{
|
||||
if (KnifeKill)
|
||||
{
|
||||
new killer_name[32], victim_name[32]
|
||||
new killer_name[MAX_NAME_LENGTH], victim_name[MAX_NAME_LENGTH]
|
||||
|
||||
get_user_name(killer, killer_name, charsmax(killer_name))
|
||||
get_user_name(victim, victim_name, charsmax(victim_name))
|
||||
@ -715,7 +715,7 @@ public client_death(killer, victim, wpnindex, hitplace, TK)
|
||||
|
||||
if (wpnindex == CSW_HEGRENADE)
|
||||
{
|
||||
new killer_name[32], victim_name[32]
|
||||
new killer_name[MAX_NAME_LENGTH], victim_name[MAX_NAME_LENGTH]
|
||||
if( GrenadeKill || GrenadeSuicide )
|
||||
{
|
||||
get_user_name(killer, killer_name, charsmax(killer_name))
|
||||
@ -744,7 +744,7 @@ public client_death(killer, victim, wpnindex, hitplace, TK)
|
||||
{
|
||||
if (HeadShotKill && wpnindex)
|
||||
{
|
||||
new killer_name[32], victim_name[32], 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))
|
||||
@ -781,7 +781,7 @@ public client_death(killer, victim, wpnindex, hitplace, TK)
|
||||
{
|
||||
if (DoubleKill)
|
||||
{
|
||||
new name[32]
|
||||
new name[MAX_NAME_LENGTH]
|
||||
|
||||
get_user_name(killer, name, charsmax(name))
|
||||
|
||||
@ -813,7 +813,7 @@ public showStatus(id)
|
||||
{
|
||||
if( PlayerName)
|
||||
{
|
||||
new name[32], pid = read_data(2)
|
||||
new name[MAX_NAME_LENGTH], pid = read_data(2)
|
||||
|
||||
get_user_name(pid, name, charsmax(name))
|
||||
new color1 = 0, color2 = 0
|
||||
@ -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)
|
||||
@ -914,7 +914,7 @@ public checkKills(param[])
|
||||
|
||||
if (MultiKill)
|
||||
{
|
||||
new name[32]
|
||||
new name[MAX_NAME_LENGTH]
|
||||
|
||||
get_user_name(id, name, charsmax(name))
|
||||
set_hudmessage(255, 0, 100, 0.05, 0.50, 2, 0.02, 6.0, 0.01, 0.1, -1)
|
||||
@ -945,7 +945,7 @@ public radioKill()
|
||||
|
||||
announceEvent(id, message[])
|
||||
{
|
||||
new name[32]
|
||||
new name[MAX_NAME_LENGTH]
|
||||
|
||||
get_user_name(id, name, charsmax(name))
|
||||
set_hudmessage(255, 100, 50, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, -1)
|
||||
@ -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--)
|
||||
|
@ -40,14 +40,14 @@
|
||||
|
||||
#define MAXMENUPOS 34
|
||||
|
||||
new g_Position[33]
|
||||
new g_Position[MAX_PLAYERS]
|
||||
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[33]
|
||||
new g_InBuyMenu[MAX_PLAYERS]
|
||||
new g_RegisteredMenus[10]
|
||||
|
||||
new g_menuStrings[6][] =
|
||||
@ -304,8 +304,8 @@ new g_Aliases2[MAXMENUPOS][] =
|
||||
}
|
||||
|
||||
#define AUTOBUYLENGTH 511
|
||||
new g_Autobuy[33][AUTOBUYLENGTH + 1]
|
||||
//new g_Rebuy[33][AUTOBUYLENGTH + 1]
|
||||
new g_Autobuy[MAX_PLAYERS][AUTOBUYLENGTH + 1]
|
||||
//new g_Rebuy[MAX_PLAYERS][AUTOBUYLENGTH + 1]
|
||||
|
||||
bool:IsOurMenuID(id)
|
||||
{
|
||||
|
@ -35,9 +35,9 @@
|
||||
#include <amxmodx>
|
||||
#include <csx>
|
||||
|
||||
new g_pingSum[33]
|
||||
new g_pingCount[33]
|
||||
new g_inGame[33]
|
||||
new g_pingSum[MAX_PLAYERS]
|
||||
new g_pingCount[MAX_PLAYERS]
|
||||
new g_inGame[MAX_PLAYERS]
|
||||
|
||||
public plugin_init()
|
||||
{
|
||||
@ -58,7 +58,7 @@ public client_disconnect(id)
|
||||
|
||||
remove_task(id)
|
||||
|
||||
new szTeam[16], szName[32], szAuthid[32], iStats[8], iHits[8], szWeapon[24]
|
||||
new szTeam[16], szName[MAX_NAME_LENGTH], szAuthid[32], iStats[8], iHits[8], szWeapon[24]
|
||||
new iUserid = get_user_userid(id)
|
||||
new _max = xmod_get_maxweapons()
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* AMX Mod X
|
||||
/* AMX Mod X
|
||||
* StatsX Plugin
|
||||
*
|
||||
* by the AMX Mod X Development Team
|
||||
@ -95,9 +95,6 @@ public SpecRankInfo = 0 // displays rank info when spectating
|
||||
|
||||
// Standard Contstants.
|
||||
#define MAX_TEAMS 2
|
||||
#define MAX_PLAYERS 32 + 1
|
||||
|
||||
#define MAX_NAME_LENGTH 31
|
||||
#define MAX_WEAPON_LENGTH 31
|
||||
#define MAX_TEXT_LENGTH 255
|
||||
#define MAX_BUFFER_LENGTH 2047
|
||||
@ -141,7 +138,7 @@ new g_iPluginMode = 0
|
||||
|
||||
new g_izUserMenuPosition[MAX_PLAYERS] = {0, ...}
|
||||
new g_izUserMenuAction[MAX_PLAYERS] = {0, ...}
|
||||
new g_izUserMenuPlayers[MAX_PLAYERS][32]
|
||||
new g_izUserMenuPlayers[MAX_PLAYERS][MAX_PLAYERS]
|
||||
|
||||
new g_izSpecMode[MAX_PLAYERS] = {0, ...}
|
||||
|
||||
@ -371,7 +368,6 @@ get_attackers(id, sBuffer[MAX_BUFFER_LENGTH + 1])
|
||||
new izStats[8], izBody[8]
|
||||
new iAttacker
|
||||
new iFound, iLen
|
||||
new iMaxPlayer = get_maxplayers()
|
||||
|
||||
iFound = 0
|
||||
sBuffer[0] = 0
|
||||
@ -394,7 +390,7 @@ get_attackers(id, sBuffer[MAX_BUFFER_LENGTH + 1])
|
||||
iLen = formatex(sBuffer, charsmax(sBuffer), "%L:^n", id, "ATTACKERS")
|
||||
|
||||
// Get and format attacker list.
|
||||
for (iAttacker = 1; iAttacker <= iMaxPlayer; iAttacker++)
|
||||
for (iAttacker = 1; iAttacker <= MaxClients; iAttacker++)
|
||||
{
|
||||
if (get_user_astats(id, iAttacker, izStats, izBody, t_sWpn, charsmax(t_sWpn)))
|
||||
{
|
||||
@ -430,7 +426,6 @@ get_victims(id, sBuffer[MAX_BUFFER_LENGTH + 1])
|
||||
new izStats[8], izBody[8]
|
||||
new iVictim
|
||||
new iFound, iLen
|
||||
new iMaxPlayer = get_maxplayers()
|
||||
|
||||
iFound = 0
|
||||
sBuffer[0] = 0
|
||||
@ -446,7 +441,7 @@ get_victims(id, sBuffer[MAX_BUFFER_LENGTH + 1])
|
||||
else
|
||||
iLen = formatex(sBuffer, charsmax(sBuffer), "%L:^n", id, "VICTIMS")
|
||||
|
||||
for (iVictim = 1; iVictim <= iMaxPlayer; iVictim++)
|
||||
for (iVictim = 1; iVictim <= MaxClients; iVictim++)
|
||||
{
|
||||
if (get_user_vstats(id, iVictim, izStats, izBody, t_sWpn, charsmax(t_sWpn)))
|
||||
{
|
||||
@ -1585,7 +1580,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)
|
||||
|
||||
@ -1637,7 +1632,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