Use the new constants in various place.
This commit is contained in:
parent
e84653571c
commit
07534edfcd
@ -53,7 +53,7 @@ new PLUGINNAME[] = "AMX Mod X"
|
||||
#define ADMIN_IPADDR (1<<3)
|
||||
#define ADMIN_NAME (1<<4)
|
||||
|
||||
new bool:g_CaseSensitiveName[33];
|
||||
new bool:g_CaseSensitiveName[MAX_PLAYERS];
|
||||
|
||||
// pcvars
|
||||
new amx_mode;
|
||||
@ -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[32], _num, _pv
|
||||
static _players[MAX_PLAYERS], _num, _pv
|
||||
get_players(_players, _num)
|
||||
for (new _i=0; _i<_num; _i++)
|
||||
{
|
||||
@ -236,7 +236,7 @@ public addadminfn(id, level, cid)
|
||||
read_argv(3, password, 63)
|
||||
|
||||
new auth[33]
|
||||
new Comment[33]; // name of player to pass to comment field
|
||||
new Comment[MAX_NAME_LENGTH]; // name of player to pass to comment field
|
||||
if (idtype & ADMIN_LOOKUP)
|
||||
{
|
||||
get_user_name(player, Comment, sizeof(Comment)-1)
|
||||
@ -273,7 +273,7 @@ public addadminfn(id, level, cid)
|
||||
|
||||
if (player > 0)
|
||||
{
|
||||
new name[32]
|
||||
new name[MAX_NAME_LENGTH]
|
||||
get_user_info(player, "name", name, 31)
|
||||
accessUser(player, name)
|
||||
}
|
||||
@ -602,8 +602,8 @@ public cmdReload(id, level, cid)
|
||||
}
|
||||
#endif
|
||||
|
||||
new players[32], num, pv
|
||||
new name[32]
|
||||
new players[MAX_PLAYERS], num, pv
|
||||
new name[MAX_NAME_LENGTH]
|
||||
get_players(players, num)
|
||||
for (new i=0; i<num; i++)
|
||||
{
|
||||
@ -821,7 +821,7 @@ public client_infochanged(id)
|
||||
return PLUGIN_CONTINUE
|
||||
}
|
||||
|
||||
new newname[32], oldname[32]
|
||||
new newname[MAX_NAME_LENGTH], oldname[MAX_NAME_LENGTH]
|
||||
|
||||
get_user_name(id, oldname, 31)
|
||||
get_user_info(id, "name", newname, 31)
|
||||
|
@ -47,8 +47,8 @@ new amx_show_activity;
|
||||
new amx_flood_time;
|
||||
new g_AdminChatFlag = ADMIN_CHAT;
|
||||
|
||||
new Float:g_Flooding[33] = {0.0, ...}
|
||||
new g_Flood[33] = {0, ...}
|
||||
new Float:g_Flooding[MAX_PLAYERS] = {0.0, ...}
|
||||
new g_Flood[MAX_PLAYERS] = {0, ...}
|
||||
|
||||
public plugin_init()
|
||||
{
|
||||
@ -138,7 +138,7 @@ public cmdSayChat(id, level)
|
||||
}
|
||||
|
||||
|
||||
new name[32], authid[32], userid
|
||||
new name[MAX_NAME_LENGTH], authid[32], userid
|
||||
|
||||
get_user_authid(id, authid, charsmax(authid))
|
||||
get_user_name(id, name, charsmax(name))
|
||||
@ -160,7 +160,7 @@ public cmdSayChat(id, level)
|
||||
{
|
||||
case 3, 4:
|
||||
{
|
||||
new players[32], plrsnum, pl
|
||||
new players[MAX_PLAYERS], plrsnum, pl
|
||||
get_players(players, plrsnum, "ch")
|
||||
for(new j; j<plrsnum; j++)
|
||||
{
|
||||
@ -225,8 +225,8 @@ public cmdSayAdmin(id)
|
||||
g_Flooding[id] = nexTime + maxChat
|
||||
}
|
||||
|
||||
new message[192], name[32], authid[32], userid
|
||||
new players[32], inum, pl
|
||||
new message[192], name[MAX_NAME_LENGTH], authid[32], userid
|
||||
new players[MAX_PLAYERS], inum, pl
|
||||
|
||||
read_args(message, charsmax(message))
|
||||
remove_quotes(message)
|
||||
@ -267,7 +267,7 @@ public cmdChat(id, level, cid)
|
||||
if (!message[0])
|
||||
return PLUGIN_HANDLED
|
||||
|
||||
new name[32], players[32], inum, authid[32], userid, pl
|
||||
new name[MAX_NAME_LENGTH], players[MAX_PLAYERS], inum, authid[32], userid, pl
|
||||
|
||||
get_user_authid(id, authid, charsmax(authid))
|
||||
get_user_name(id, name, charsmax(name))
|
||||
@ -295,7 +295,7 @@ public cmdSay(id, level, cid)
|
||||
if (!cmd_access(id, level, cid, 2))
|
||||
return PLUGIN_HANDLED
|
||||
|
||||
new message[192], name[32], authid[32], userid
|
||||
new message[192], name[MAX_NAME_LENGTH], authid[32], userid
|
||||
|
||||
read_args(message, charsmax(message))
|
||||
remove_quotes(message)
|
||||
@ -316,7 +316,7 @@ public cmdPsay(id, level, cid)
|
||||
if (!cmd_access(id, level, cid, 3))
|
||||
return PLUGIN_HANDLED
|
||||
|
||||
new name[32]
|
||||
new name[MAX_NAME_LENGTH]
|
||||
read_argv(1, name, charsmax(name))
|
||||
new priv = cmd_target(id, name, 0)
|
||||
|
||||
@ -325,7 +325,7 @@ public cmdPsay(id, level, cid)
|
||||
|
||||
new length = strlen(name) + 1
|
||||
|
||||
new message[192], name2[32], authid[32], authid2[32], userid, userid2
|
||||
new message[192], name2[MAX_NAME_LENGTH], authid[32], authid2[32], userid, userid2
|
||||
|
||||
get_user_authid(id, authid, charsmax(authid))
|
||||
get_user_name(id, name2, charsmax(name2))
|
||||
@ -361,7 +361,7 @@ public cmdTsay(id, level, cid)
|
||||
if (!cmd_access(id, level, cid, 3))
|
||||
return PLUGIN_HANDLED
|
||||
|
||||
new cmd[16], color[16], color2[16], message[192], name[32], authid[32], userid = 0
|
||||
new cmd[16], color[16], color2[16], message[192], name[MAX_NAME_LENGTH], authid[32], userid = 0
|
||||
|
||||
read_argv(0, cmd, charsmax(cmd))
|
||||
new bool:tsay = (tolower(cmd[4]) == 't')
|
||||
@ -407,7 +407,7 @@ public cmdTsay(id, level, cid)
|
||||
{
|
||||
case 3, 4:
|
||||
{
|
||||
new players[32], plrsnum, pl
|
||||
new players[MAX_PLAYERS], plrsnum, pl
|
||||
get_players(players, plrsnum, "ch")
|
||||
for(new i; i<plrsnum; i++)
|
||||
{
|
||||
|
@ -50,7 +50,7 @@ new timelimit;
|
||||
new p_amx_tempban_maxtime;
|
||||
|
||||
// Old connection queue
|
||||
new g_Names[OLD_CONNECTION_QUEUE][32];
|
||||
new g_Names[OLD_CONNECTION_QUEUE][MAX_NAME_LENGTH];
|
||||
new g_SteamIDs[OLD_CONNECTION_QUEUE][32];
|
||||
new g_IPs[OLD_CONNECTION_QUEUE][32];
|
||||
new g_Access[OLD_CONNECTION_QUEUE];
|
||||
@ -229,7 +229,7 @@ public cmdKick(id, level, cid)
|
||||
if (!player)
|
||||
return PLUGIN_HANDLED
|
||||
|
||||
new authid[32], authid2[32], name2[32], name[32], userid2, reason[32]
|
||||
new authid[32], authid2[32], name2[MAX_NAME_LENGTH], name[MAX_NAME_LENGTH], userid2, reason[32]
|
||||
|
||||
get_user_authid(id, authid, charsmax(authid))
|
||||
get_user_authid(player, authid2, charsmax(authid2))
|
||||
@ -263,7 +263,7 @@ public cmdUnban(id, level, cid)
|
||||
if (!cmd_access(id, level, cid, 2))
|
||||
return PLUGIN_HANDLED
|
||||
|
||||
new arg[32], authid[32], name[32]
|
||||
new arg[32], authid[32], name[MAX_NAME_LENGTH]
|
||||
|
||||
read_argv(1, arg, charsmax(arg))
|
||||
|
||||
@ -320,7 +320,7 @@ public cmdAddBan(id, level, cid)
|
||||
}
|
||||
}
|
||||
|
||||
new arg[32], authid[32], name[32], minutes[32], reason[32]
|
||||
new arg[32], authid[32], name[MAX_NAME_LENGTH], minutes[32], reason[32]
|
||||
|
||||
read_argv(1, arg, charsmax(arg))
|
||||
read_argv(2, minutes, charsmax(minutes))
|
||||
@ -353,7 +353,7 @@ public cmdAddBan(id, level, cid)
|
||||
if (isip)
|
||||
{
|
||||
new IP[32];
|
||||
new Name[32];
|
||||
new Name[MAX_NAME_LENGTH];
|
||||
new dummy[1];
|
||||
new Access;
|
||||
for (new i = 0; i < g_Size; i++)
|
||||
@ -455,7 +455,7 @@ public cmdBan(id, level, cid)
|
||||
return PLUGIN_HANDLED
|
||||
}
|
||||
|
||||
new authid[32], name2[32], authid2[32], name[32]
|
||||
new authid[32], name2[MAX_NAME_LENGTH], authid2[32], name[MAX_NAME_LENGTH]
|
||||
new userid2 = get_user_userid(player)
|
||||
|
||||
get_user_authid(player, authid2, charsmax(authid2))
|
||||
@ -485,7 +485,7 @@ public cmdBan(id, level, cid)
|
||||
|
||||
new msg[256];
|
||||
new len;
|
||||
new players[32], pnum, plr
|
||||
new players[MAX_PLAYERS], pnum, plr
|
||||
get_players(players, pnum, "ch")
|
||||
for (new i; i<pnum; i++)
|
||||
{
|
||||
@ -541,7 +541,7 @@ public cmdBanIP(id, level, cid)
|
||||
return PLUGIN_HANDLED
|
||||
}
|
||||
|
||||
new authid[32], name2[32], authid2[32], name[32]
|
||||
new authid[32], name2[MAX_NAME_LENGTH], authid2[32], name[MAX_NAME_LENGTH]
|
||||
new userid2 = get_user_userid(player)
|
||||
|
||||
get_user_authid(player, authid2, charsmax(authid2))
|
||||
@ -572,7 +572,7 @@ public cmdBanIP(id, level, cid)
|
||||
|
||||
new msg[256];
|
||||
new len;
|
||||
new players[32], pnum, plr
|
||||
new players[MAX_PLAYERS], pnum, plr
|
||||
get_players(players, pnum, "ch")
|
||||
for (new i; i<pnum; i++)
|
||||
{
|
||||
@ -616,7 +616,7 @@ public cmdSlay(id, level, cid)
|
||||
|
||||
user_kill(player)
|
||||
|
||||
new authid[32], name2[32], authid2[32], name[32]
|
||||
new authid[32], name2[MAX_NAME_LENGTH], authid2[32], name[MAX_NAME_LENGTH]
|
||||
|
||||
get_user_authid(id, authid, charsmax(authid))
|
||||
get_user_name(id, name, charsmax(name))
|
||||
@ -645,7 +645,7 @@ public cmdSlap(id, level, cid)
|
||||
if (!player)
|
||||
return PLUGIN_HANDLED
|
||||
|
||||
new spower[32], authid[32], name2[32], authid2[32], name[32]
|
||||
new spower[32], authid[32], name2[MAX_NAME_LENGTH], authid2[32], name[MAX_NAME_LENGTH]
|
||||
|
||||
read_argv(2, spower, charsmax(spower))
|
||||
|
||||
@ -686,7 +686,7 @@ public cmdMap(id, level, cid)
|
||||
return PLUGIN_HANDLED
|
||||
}
|
||||
|
||||
new authid[32], name[32]
|
||||
new authid[32], name[MAX_NAME_LENGTH]
|
||||
|
||||
get_user_authid(id, authid, charsmax(authid))
|
||||
get_user_name(id, name, charsmax(name))
|
||||
@ -725,7 +725,7 @@ public cmdExtendMap(id, level, cid)
|
||||
get_mapname(mapname, charsmax(mapname))
|
||||
set_pcvar_num( timelimit , get_pcvar_num( timelimit ) + mns)
|
||||
|
||||
new authid[32], name[32]
|
||||
new authid[32], name[MAX_NAME_LENGTH]
|
||||
|
||||
get_user_authid(id, authid, charsmax(authid))
|
||||
get_user_name(id, name, charsmax(name))
|
||||
@ -798,7 +798,7 @@ public cmdCvar(id, level, cid)
|
||||
return PLUGIN_HANDLED
|
||||
}
|
||||
|
||||
new authid[32], name[32]
|
||||
new authid[32], name[MAX_NAME_LENGTH]
|
||||
|
||||
get_user_authid(id, authid, charsmax(authid))
|
||||
get_user_name(id, name, charsmax(name))
|
||||
@ -810,7 +810,7 @@ public cmdCvar(id, level, cid)
|
||||
// Display the message to all clients
|
||||
|
||||
new cvar_val[64];
|
||||
new players[32], pnum, plr
|
||||
new players[MAX_PLAYERS], pnum, plr
|
||||
get_players(players, pnum, "ch")
|
||||
for (new i; i<pnum; i++)
|
||||
{
|
||||
@ -926,7 +926,7 @@ public cmdXvar(id, level, cid)
|
||||
num_to_str(value, arg2, charsmax(arg2));
|
||||
}
|
||||
|
||||
new authid[32], name[32];
|
||||
new authid[32], name[MAX_NAME_LENGTH];
|
||||
|
||||
get_user_authid(id, authid, charsmax(authid));
|
||||
get_user_name(id, name, charsmax(name));
|
||||
@ -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);
|
||||
|
||||
// Display the message to all clients
|
||||
new players[32], pnum, plr;
|
||||
new players[MAX_PLAYERS], pnum, plr;
|
||||
get_players(players, pnum, "ch");
|
||||
for (new i; i<pnum; i++)
|
||||
{
|
||||
@ -959,7 +959,7 @@ public cmdPlugins(id, level, cid)
|
||||
return PLUGIN_HANDLED;
|
||||
}
|
||||
|
||||
new name[32], version[32], author[32], filename[32], status[32]
|
||||
new name[MAX_NAME_LENGTH], version[32], author[32], filename[32], status[32]
|
||||
new lName[32], lVersion[32], lAuthor[32], lFile[32], lStatus[32]
|
||||
|
||||
format(lName, charsmax(lName), "%L", id, "NAME")
|
||||
@ -1071,7 +1071,7 @@ public cmdCfg(id, level, cid)
|
||||
return PLUGIN_HANDLED
|
||||
}
|
||||
|
||||
new authid[32], name[32]
|
||||
new authid[32], name[MAX_NAME_LENGTH]
|
||||
|
||||
get_user_authid(id, authid, charsmax(authid))
|
||||
get_user_name(id, name, charsmax(name))
|
||||
@ -1111,7 +1111,7 @@ public cmdPause(id, level, cid)
|
||||
if (!cmd_access(id, level, cid, 1))
|
||||
return PLUGIN_HANDLED
|
||||
|
||||
new authid[32], name[32], slayer = id
|
||||
new authid[32], name[MAX_NAME_LENGTH], slayer = id
|
||||
|
||||
get_user_authid(id, authid, charsmax(authid))
|
||||
get_user_name(id, name, charsmax(name))
|
||||
@ -1139,7 +1139,7 @@ public cmdPause(id, level, cid)
|
||||
|
||||
// Display the message to all clients
|
||||
|
||||
new players[32], pnum
|
||||
new players[MAX_PLAYERS], pnum
|
||||
get_players(players, pnum, "ch")
|
||||
for (new i; i<pnum; i++)
|
||||
{
|
||||
@ -1179,7 +1179,7 @@ public cmdRcon(id, level, cid)
|
||||
if (!cmd_access(id, level, cid, 2))
|
||||
return PLUGIN_HANDLED
|
||||
|
||||
new arg[128], authid[32], name[32]
|
||||
new arg[128], authid[32], name[MAX_NAME_LENGTH]
|
||||
|
||||
read_args(arg, charsmax(arg))
|
||||
get_user_authid(id, authid, charsmax(authid))
|
||||
@ -1198,7 +1198,7 @@ public cmdWho(id, level, cid)
|
||||
if (!cmd_access(id, level, cid, 1))
|
||||
return PLUGIN_HANDLED
|
||||
|
||||
new players[32], inum, cl_on_server[64], authid[32], name[32], flags, sflags[32], plr
|
||||
new players[MAX_PLAYERS], 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]
|
||||
|
||||
formatex(lImm, charsmax(lImm), "%L", id, "IMMU")
|
||||
@ -1255,7 +1255,7 @@ public cmdLeave(id, level, cid)
|
||||
ltags[ltagsnum++][0] = 0
|
||||
}
|
||||
|
||||
new nick[32], ires, pnum = get_maxplayers() + 1, count = 0, lReason[128]
|
||||
new nick[MAX_NAME_LENGTH], ires, pnum = MaxClients, count = 0, lReason[128]
|
||||
|
||||
for (new b = 1; b < pnum; ++b)
|
||||
{
|
||||
@ -1290,7 +1290,7 @@ public cmdLeave(id, level, cid)
|
||||
|
||||
console_print(id, "[AMXX] %L", id, "KICKED_CLIENTS", count)
|
||||
|
||||
new authid[32], name[32]
|
||||
new authid[32], name[MAX_NAME_LENGTH]
|
||||
|
||||
get_user_authid(id, authid, charsmax(authid))
|
||||
get_user_name(id, name, charsmax(name))
|
||||
@ -1339,7 +1339,7 @@ public cmdLast(id, level, cid)
|
||||
return PLUGIN_HANDLED;
|
||||
}
|
||||
|
||||
new name[32];
|
||||
new name[MAX_NAME_LENGTH];
|
||||
new authid[32];
|
||||
new ip[32];
|
||||
new flags[32];
|
||||
|
@ -48,7 +48,7 @@ public plugin_init()
|
||||
g_ResPtr = register_cvar("amx_reservation", "0")
|
||||
g_HidePtr = register_cvar("amx_hideslots", "0")
|
||||
g_sv_visiblemaxplayers = get_cvar_pointer("sv_visiblemaxplayers")
|
||||
g_maxplayers = get_maxplayers()
|
||||
g_maxplayers = MaxClients
|
||||
}
|
||||
|
||||
public plugin_cfg()
|
||||
|
@ -77,16 +77,14 @@ public cmdCancelVote(id, level, cid)
|
||||
|
||||
if (task_exists(99889988, 1))
|
||||
{
|
||||
new authid[32], name[32]
|
||||
new authid[32], name[MAX_NAME_LENGTH]
|
||||
|
||||
get_user_authid(id, authid, 31)
|
||||
get_user_name(id, name, 31)
|
||||
log_amx("Vote: ^"%s<%d><%s><>^" cancel vote session", name, get_user_userid(id), authid)
|
||||
|
||||
|
||||
new maxpl=get_maxplayers();
|
||||
new msg[256];
|
||||
for (new i = 1; i <= maxpl; i++)
|
||||
for (new i = 1; i <= MaxClients; i++)
|
||||
{
|
||||
if (is_user_connected(i) && !is_user_bot(i))
|
||||
{
|
||||
@ -152,7 +150,7 @@ public checkVotes()
|
||||
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 iResult = g_voteCount[best]
|
||||
new players[32], pnum, i
|
||||
new players[MAX_PLAYERS], pnum, i
|
||||
|
||||
get_players(players, pnum, "c")
|
||||
|
||||
@ -218,7 +216,7 @@ public voteCount(id, key)
|
||||
{
|
||||
if (get_cvar_num("amx_vote_answers"))
|
||||
{
|
||||
new name[32]
|
||||
new name[MAX_NAME_LENGTH]
|
||||
get_user_name(id, name, 31)
|
||||
|
||||
if (g_yesNoVote)
|
||||
@ -304,7 +302,7 @@ public cmdVoteMap(id, level, cid)
|
||||
g_yesNoVote = 1
|
||||
}
|
||||
|
||||
new authid[32], name[32]
|
||||
new authid[32], name[MAX_NAME_LENGTH]
|
||||
|
||||
get_user_authid(id, authid, 31)
|
||||
get_user_name(id, name, 31)
|
||||
@ -314,9 +312,8 @@ public cmdVoteMap(id, level, cid)
|
||||
else
|
||||
log_amx("Vote: ^"%s<%d><%s><>^" vote maps (map#1 ^"%s^") (map#2 ^"%s^") (map#3 ^"%s^") (map#4 ^"%s^")", name, get_user_userid(id), authid, g_optionName[0], g_optionName[1], g_optionName[2], g_optionName[3])
|
||||
|
||||
new maxpl=get_maxplayers();
|
||||
new msg[256];
|
||||
for (new i = 1; i <= maxpl; i++)
|
||||
for (new i = 1; i <= MaxClients; i++)
|
||||
{
|
||||
if (is_user_connected(i) && !is_user_bot(i))
|
||||
{
|
||||
@ -378,15 +375,14 @@ public cmdVote(id, level, cid)
|
||||
read_argv(i+2, g_optionName[i], sizeof(g_optionName[])-1);
|
||||
}
|
||||
|
||||
new authid[32], name[32]
|
||||
new authid[32], name[MAX_NAME_LENGTH]
|
||||
|
||||
get_user_authid(id, authid, 31)
|
||||
get_user_name(id, name, 31)
|
||||
log_amx("Vote: ^"%s<%d><%s><>^" vote custom (question ^"%s^") (option#1 ^"%s^") (option#2 ^"%s^")", name, get_user_userid(id), authid, quest, g_optionName[0], g_optionName[1])
|
||||
|
||||
new maxpl=get_maxplayers();
|
||||
new msg[256];
|
||||
for (new i = 1; i <= maxpl; i++)
|
||||
for (new i = 1; i <= MaxClients; i++)
|
||||
{
|
||||
if (is_user_connected(i) && !is_user_bot(i))
|
||||
{
|
||||
@ -513,17 +509,16 @@ public cmdVoteKickBan(id, level, cid)
|
||||
num_to_str(get_user_userid(player), g_optionName[0], 31)
|
||||
}
|
||||
|
||||
new authid[32], name[32]
|
||||
new authid[32], name[MAX_NAME_LENGTH]
|
||||
|
||||
get_user_authid(id, authid, 31)
|
||||
get_user_name(id, name, 31)
|
||||
log_amx("Vote: ^"%s<%d><%s><>^" vote %s (target ^"%s^")", name, get_user_userid(id), authid, voteban ? "ban" : "kick", arg)
|
||||
|
||||
new maxpl=get_maxplayers();
|
||||
new msg[256];
|
||||
new right[256];
|
||||
new dummy[1];
|
||||
for (new i = 1; i <= maxpl; i++)
|
||||
for (new i = 1; i <= MaxClients; i++)
|
||||
{
|
||||
if (is_user_connected(i) && !is_user_bot(i))
|
||||
{
|
||||
|
@ -34,8 +34,8 @@
|
||||
|
||||
#include <amxmodx>
|
||||
|
||||
new Float:g_Flooding[33] = {0.0, ...}
|
||||
new g_Flood[33] = {0, ...}
|
||||
new Float:g_Flooding[MAX_PLAYERS] = {0.0, ...}
|
||||
new g_Flood[MAX_PLAYERS] = {0, ...}
|
||||
|
||||
new amx_flood_time;
|
||||
|
||||
|
@ -86,10 +86,10 @@ new g_cvarCmd[MAX_CVARS*5][32]
|
||||
new g_cvarCmdNum
|
||||
new g_cvarNum
|
||||
|
||||
new g_menuPosition[33]
|
||||
new g_menuSelect[33][MAX_CMDS]
|
||||
new g_menuSelectNum[33]
|
||||
new g_menuLayer[33]
|
||||
new g_menuPosition[MAX_PLAYERS]
|
||||
new g_menuSelect[MAX_PLAYERS][MAX_CMDS]
|
||||
new g_menuSelectNum[MAX_PLAYERS]
|
||||
new g_menuLayer[MAX_PLAYERS]
|
||||
|
||||
new g_coloredMenus
|
||||
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -36,14 +36,14 @@
|
||||
#include <amxmisc>
|
||||
#include <dodx>
|
||||
|
||||
new g_menuPosition[33]
|
||||
new g_menuPlayers[33][32]
|
||||
new g_menuPlayersNum[33]
|
||||
new g_menuOption[33]
|
||||
new g_menuSettings[33]
|
||||
new g_menuPosition[MAX_PLAYERS]
|
||||
new g_menuPlayers[MAX_PLAYERS][MAX_PLAYERS]
|
||||
new g_menuPlayersNum[MAX_PLAYERS]
|
||||
new g_menuOption[MAX_PLAYERS]
|
||||
new g_menuSettings[MAX_PLAYERS]
|
||||
|
||||
new g_menuSelect[33][64]
|
||||
new g_menuSelectNum[33]
|
||||
new g_menuSelect[MAX_PLAYERS][64]
|
||||
new g_menuSelectNum[MAX_PLAYERS]
|
||||
|
||||
#define MAX_CLCMDS 24
|
||||
|
||||
@ -137,7 +137,7 @@ public actionBanMenu(id, key)
|
||||
|
||||
new player = g_menuPlayers[id][g_menuPosition[id] * 7 + key]
|
||||
|
||||
new name[32], name2[32], authid[32], authid2[32]
|
||||
new name[MAX_NAME_LENGTH], name2[MAX_NAME_LENGTH], authid[32], authid2[32]
|
||||
get_user_name(player, name2, 31)
|
||||
get_user_authid(id, authid, 31)
|
||||
get_user_authid(player, authid2, 31)
|
||||
@ -214,7 +214,7 @@ displayBanMenu(id,pos)
|
||||
new menuBody[512]
|
||||
new b = 0
|
||||
new i
|
||||
new name[32]
|
||||
new name[MAX_NAME_LENGTH]
|
||||
new start = pos * 7
|
||||
|
||||
if (start >= g_menuPlayersNum[id])
|
||||
@ -298,7 +298,7 @@ public actionSlapMenu(id,key) {
|
||||
default: {
|
||||
new player = g_menuPlayers[id][g_menuPosition[id] * 7 + key]
|
||||
|
||||
new name2[32]
|
||||
new name2[MAX_NAME_LENGTH]
|
||||
get_user_name(player,name2,31)
|
||||
|
||||
if (!is_user_alive(player)) {
|
||||
@ -307,7 +307,7 @@ public actionSlapMenu(id,key) {
|
||||
return PLUGIN_HANDLED
|
||||
}
|
||||
|
||||
new authid[32],authid2[32], name[32]
|
||||
new authid[32],authid2[32], name[MAX_NAME_LENGTH]
|
||||
|
||||
get_user_authid(id,authid,31)
|
||||
get_user_authid(player,authid2,31)
|
||||
@ -352,7 +352,7 @@ displaySlapMenu(id,pos)
|
||||
new menuBody[512]
|
||||
new b = 0
|
||||
new i
|
||||
new name[32], team[8]
|
||||
new name[MAX_NAME_LENGTH], team[8]
|
||||
new start = pos * 7
|
||||
|
||||
if (start >= g_menuPlayersNum[id])
|
||||
@ -427,7 +427,7 @@ public actionKickMenu(id,key)
|
||||
default: {
|
||||
new player = g_menuPlayers[id][g_menuPosition[id] * 8 + key]
|
||||
|
||||
new authid[32],authid2[32], name[32], name2[32]
|
||||
new authid[32],authid2[32], name[MAX_NAME_LENGTH], name2[MAX_NAME_LENGTH]
|
||||
get_user_authid(id,authid,31)
|
||||
get_user_authid(player,authid2,31)
|
||||
get_user_name(id,name,31)
|
||||
@ -461,7 +461,7 @@ displayKickMenu(id, pos)
|
||||
new menuBody[512]
|
||||
new b = 0
|
||||
new i
|
||||
new name[32]
|
||||
new name[MAX_NAME_LENGTH]
|
||||
new start = pos * 8
|
||||
|
||||
if (start >= g_menuPlayersNum[id])
|
||||
@ -529,7 +529,7 @@ public actionTeamMenu(id,key) {
|
||||
case 9: displayTeamMenu(id,--g_menuPosition[id])
|
||||
default: {
|
||||
new player = g_menuPlayers[id][g_menuPosition[id] * 7 + key]
|
||||
new authid[32],authid2[32], name[32], name2[32]
|
||||
new authid[32],authid2[32], name[MAX_NAME_LENGTH], name2[MAX_NAME_LENGTH]
|
||||
get_user_name(player,name2,31)
|
||||
get_user_authid(id,authid,31)
|
||||
get_user_authid(player,authid2,31)
|
||||
@ -562,7 +562,7 @@ displayTeamMenu(id, pos)
|
||||
new menuBody[512]
|
||||
new b = 0
|
||||
new i, iteam
|
||||
new name[32], team[8]
|
||||
new name[MAX_NAME_LENGTH], team[8]
|
||||
new start = pos * 7
|
||||
|
||||
if (start >= g_menuPlayersNum[id])
|
||||
@ -640,7 +640,7 @@ public actionClcmdMenu(id,key) {
|
||||
new player = g_menuPlayers[id][g_menuPosition[id] * 7 + key]
|
||||
new flags = g_clcmdMisc[g_menuSelect[id][g_menuOption[id]]][1]
|
||||
if (is_user_connected(player)) {
|
||||
new command[64], authid[32], name[32], userid[32]
|
||||
new command[64], authid[32], name[MAX_NAME_LENGTH], userid[32]
|
||||
copy(command,63,g_clcmdCmd[g_menuSelect[id][g_menuOption[id]]])
|
||||
get_user_authid(player,authid,31)
|
||||
get_user_name(player,name,31)
|
||||
@ -673,7 +673,7 @@ displayClcmdMenu(id, pos)
|
||||
new menuBody[512]
|
||||
new b = 0
|
||||
new i
|
||||
new name[32]
|
||||
new name[MAX_NAME_LENGTH]
|
||||
new start = pos * 7
|
||||
|
||||
if (start >= g_menuPlayersNum[id])
|
||||
|
@ -58,20 +58,20 @@ public EnemyGreKillSound
|
||||
public LeadSounds
|
||||
public MortarKill
|
||||
|
||||
new g_streakKills[33][2]
|
||||
new g_multiKills[33][2]
|
||||
new g_streakKills[MAX_PLAYERS][2]
|
||||
new g_multiKills[MAX_PLAYERS][2]
|
||||
new Float:g_prevKill
|
||||
new g_prevKillerId
|
||||
new g_KillCount;
|
||||
new g_RoundScore[2]
|
||||
|
||||
new g_userPosition[33]
|
||||
new g_userState[33]
|
||||
new g_userPlayers[33][32]
|
||||
new g_userPosition[MAX_PLAYERS]
|
||||
new g_userState[MAX_PLAYERS]
|
||||
new g_userPlayers[MAX_PLAYERS][MAX_PLAYERS]
|
||||
new g_Buffer[2048]
|
||||
|
||||
new g_Killers[33][3]
|
||||
new Float:g_DeathStats[33]
|
||||
new g_Killers[MAX_PLAYERS][3]
|
||||
new Float:g_DeathStats[MAX_PLAYERS]
|
||||
|
||||
new g_damage_sync
|
||||
new g_center1_sync
|
||||
@ -251,14 +251,14 @@ public cmdFF(id){
|
||||
public endGameStats(){
|
||||
new i
|
||||
if ( EndPlayer ){
|
||||
new players[32], inum
|
||||
new players[MAX_PLAYERS], inum
|
||||
get_players(players,inum)
|
||||
for(i = 0; i < inum; ++i){
|
||||
displayStats_steam(players[i],players[i])
|
||||
}
|
||||
}
|
||||
else if ( EndTop15 ){
|
||||
new players[32], inum
|
||||
new players[MAX_PLAYERS], inum
|
||||
get_players(players,inum)
|
||||
|
||||
new g_Top[8], top = get_cvar_num("dodstats_topvalue")
|
||||
@ -286,10 +286,9 @@ public cmdStats(id){
|
||||
|
||||
/* build list of attackers */
|
||||
getAttackers(id) {
|
||||
new name[32],wpn[32], stats[9],body[8],found=0
|
||||
new name[MAX_NAME_LENGTH],wpn[32], stats[9],body[8],found=0
|
||||
new pos = format(g_Buffer,2047,"%L^n",id,"ATTACKERS")
|
||||
new amax = get_maxplayers()
|
||||
for(new a = 1; a <= amax; ++a){
|
||||
for(new a = 1; a <= MaxClients; ++a){
|
||||
|
||||
if(get_user_astats(id,a,stats,body,wpn,31))
|
||||
{
|
||||
@ -308,10 +307,9 @@ getAttackers(id) {
|
||||
|
||||
/* build list of victims */
|
||||
getVictims(id) {
|
||||
new name[32],wpn[32], stats[9],body[8],found=0
|
||||
new name[MAX_NAME_LENGTH],wpn[32], stats[9],body[8],found=0
|
||||
new pos = format(g_Buffer,2047,"%L^n",id,"VICTIMS")
|
||||
new amax = get_maxplayers()
|
||||
for(new a = 1; a <= amax; ++a){
|
||||
for(new a = 1; a <= MaxClients; ++a){
|
||||
if(get_user_vstats(id,a,stats,body,wpn,31))
|
||||
{
|
||||
found = 1
|
||||
@ -338,7 +336,7 @@ getHits(id,killer) {
|
||||
|
||||
/* build list of hits for say hp */
|
||||
getMyHits(id,killed) {
|
||||
new name[32], stats[9], body[8], found = 0
|
||||
new name[MAX_NAME_LENGTH], stats[9], body[8], found = 0
|
||||
get_user_name(killed,name,31)
|
||||
new pos = format(g_Buffer,2047,"%L",id,"YOU_HIT",name)
|
||||
get_user_vstats(id,killed,stats,body)
|
||||
@ -361,7 +359,7 @@ public cmdKiller(id) {
|
||||
return PLUGIN_HANDLED
|
||||
}
|
||||
if (g_Killers[id][0]) {
|
||||
new name[32], stats[9], body[8], wpn[33], mstats[9], mbody[8]
|
||||
new name[MAX_NAME_LENGTH], stats[9], body[8], wpn[33], mstats[9], mbody[8]
|
||||
get_user_name(g_Killers[id][0],name,31)
|
||||
get_user_astats(id,g_Killers[id][0],stats,body,wpn,31)
|
||||
get_user_vstats(id,g_Killers[id][0],mstats,mbody)
|
||||
@ -410,7 +408,7 @@ showStatsMenu(id,pos){
|
||||
if (start >= inum) start = pos = g_userPosition[id] = 0
|
||||
|
||||
new len = format(menu_body,511,"\y%L\R%d/%d^n\w^n",id,"SERVER_STATS",pos + 1,((inum/max_menupos)+((inum%max_menupos)?1:0)))
|
||||
new name[32], end = start + max_menupos, keys = (1<<9)|(1<<7)
|
||||
new name[MAX_NAME_LENGTH], end = start + max_menupos, keys = (1<<9)|(1<<7)
|
||||
if (end > inum) end = inum
|
||||
for(new a = start; a < end; ++a){
|
||||
get_user_name(g_userPlayers[id][a],name,31)
|
||||
@ -439,10 +437,10 @@ public NadeCatch(id){
|
||||
new catch = ( ( get_user_team(id) == 1 && GreId == 15 ) || ( get_user_team(id) == 2 && GreId == 16 ) ) ? 1:0
|
||||
if ( catch ) {
|
||||
if ( GreCatch ){
|
||||
new player_name[32]
|
||||
get_user_name(id,player_name,32)
|
||||
new player_name[MAX_NAME_LENGTH]
|
||||
get_user_name(id,player_name,charsmax(player_name))
|
||||
set_hudmessage(200, 100, 0, -1.0, 0.20, 0, 6.0, 6.0, 0.5, 0.15, -1)
|
||||
for (new i=1;i<=get_maxplayers();i++){
|
||||
for (new i=1;i<=MaxClients;i++){
|
||||
if ( g_Killers[i][0] && g_DeathStats[i] > get_gametime() )
|
||||
continue
|
||||
show_hudmessage(i,"%L",i,"NADE_CAUGHT",player_name)
|
||||
@ -473,12 +471,12 @@ public round_end(){
|
||||
|
||||
if ( !EndRoundStats ) return PLUGIN_CONTINUE
|
||||
|
||||
new g_Buffer2[1024], len, players[32], pnum, stats[9],bodyhits[8]
|
||||
new g_Buffer2[1024], len, players[MAX_PLAYERS], pnum, stats[9],bodyhits[8]
|
||||
get_players( players , pnum )
|
||||
|
||||
|
||||
new score = 0, kills = 0, hs =0 , damage = 0, hits = 0, who1 = 0, who2 = 0, who3 = 0
|
||||
new name1[32],name2[32],name3[32]
|
||||
new name1[MAX_NAME_LENGTH],name2[MAX_NAME_LENGTH],name3[MAX_NAME_LENGTH]
|
||||
|
||||
for(new i = 0; i < pnum; ++i){
|
||||
get_user_rstats( players[i],stats, bodyhits )
|
||||
@ -541,7 +539,7 @@ public client_damage(attacker,victim,damage,wpnindex,hitplace,TA)
|
||||
{
|
||||
if ( TA ){
|
||||
if ( TAInfo && is_user_alive(victim) ){
|
||||
new attacker_name[32]
|
||||
new attacker_name[MAX_NAME_LENGTH]
|
||||
get_user_name(attacker,attacker_name,31)
|
||||
client_print(0,print_chat,"%L",LANG_PLAYER,"TA_MSG",attacker_name)
|
||||
}
|
||||
@ -563,7 +561,7 @@ public client_death(killer,victim,wpnindex,hitplace,TK)
|
||||
if (!is_user_connected(killer) || !is_user_connected(victim))
|
||||
return PLUGIN_CONTINUE
|
||||
|
||||
new killer_name[32]
|
||||
new killer_name[MAX_NAME_LENGTH]
|
||||
get_user_name(killer,killer_name,31)
|
||||
|
||||
new enemygre = ( ( (wpnindex == DODW_HANDGRENADE || wpnindex == DODW_MILLS_BOMB) && get_user_team(killer) == 2 ) || ( wpnindex == DODW_STICKGRENADE && get_user_team(killer) == 1 ) ) ? 1:0
|
||||
@ -585,7 +583,7 @@ public client_death(killer,victim,wpnindex,hitplace,TK)
|
||||
new headshot = ( hitplace == HIT_HEAD ) ? 1:0
|
||||
new selfKill = ( killer == victim ) ? 1:0
|
||||
|
||||
new victim_name[32]
|
||||
new victim_name[MAX_NAME_LENGTH]
|
||||
get_user_name(victim,victim_name,31)
|
||||
|
||||
new Float:statstime = get_cvar_float("dodstats_statstime")
|
||||
@ -603,7 +601,7 @@ public client_death(killer,victim,wpnindex,hitplace,TK)
|
||||
set_hudmessage(255, 100, 100, -1.0, 0.15, 1, 6.0, 6.0, 0.5, 0.15, -1)
|
||||
if ( !enemygre ) ShowSyncHudMsg(0, g_center1_sync,"%L",LANG_PLAYER,g_SHeMessages[ random_num(0,3) ],victim_name)
|
||||
else
|
||||
for (new i=1;i<=get_maxplayers();i++){
|
||||
for (new i=1;i<=MaxClients;i++){
|
||||
if ( g_Killers[i][0] && g_DeathStats[i] > get_gametime() )
|
||||
continue
|
||||
ShowSyncHudMsg(i, g_center1_sync, "%L",i,"NADE_FAILED",victim_name)
|
||||
@ -654,7 +652,7 @@ public client_death(killer,victim,wpnindex,hitplace,TK)
|
||||
if ( (a >>= 1) > 6 ) a = 6
|
||||
if ( KillingStreak ){
|
||||
set_hudmessage(0, 100, 255, 0.05, 0.55, 2, 0.02, 6.0, 0.01, 0.1, -1)
|
||||
for (new i=1;i<=get_maxplayers();i++){
|
||||
for (new i=1;i<=MaxClients;i++){
|
||||
if ( g_Killers[i][0] && g_DeathStats[i] > get_gametime() )
|
||||
continue
|
||||
ShowSyncHudMsg(i, g_left_sync, "%L",i,g_KillingMsg[ a ], killer_name)
|
||||
@ -680,7 +678,7 @@ public client_death(killer,victim,wpnindex,hitplace,TK)
|
||||
|
||||
|
||||
set_hudmessage(255, 100, 100, -1.0, 0.15, 1, 6.0, 6.0, 0.5, 0.15, -1)
|
||||
for (new i=1;i<=get_maxplayers();i++){
|
||||
for (new i=1;i<=MaxClients;i++){
|
||||
if ( g_Killers[i][0] && g_DeathStats[i] > get_gametime() )
|
||||
|
||||
continue
|
||||
@ -693,7 +691,7 @@ public client_death(killer,victim,wpnindex,hitplace,TK)
|
||||
if ( enemygre ){
|
||||
if ( EnemyGreKill ){
|
||||
set_hudmessage(255, 100, 100, -1.0, 0.15, 1, 6.0, 6.0, 0.5, 0.15, -1)
|
||||
for (new i=1;i<=get_maxplayers();i++){
|
||||
for (new i=1;i<=MaxClients;i++){
|
||||
if ( g_Killers[i][0] && g_DeathStats[i] > get_gametime() )
|
||||
continue
|
||||
ShowSyncHudMsg(i, g_center1_sync, "%L",LANG_PLAYER,"NADE_MASTER",killer_name)
|
||||
@ -703,7 +701,7 @@ public client_death(killer,victim,wpnindex,hitplace,TK)
|
||||
}
|
||||
else if ( GrenadeKill ){
|
||||
set_hudmessage(255, 100, 100, -1.0, 0.15, 1, 6.0, 6.0, 0.5, 0.15, -1)
|
||||
for (new i=1;i<=get_maxplayers();i++){
|
||||
for (new i=1;i<=MaxClients;i++){
|
||||
if ( g_Killers[i][0] && g_DeathStats[i] > get_gametime() )
|
||||
continue
|
||||
ShowSyncHudMsg(i, g_center1_sync, "%L",i,g_HeMessages[ random_num(0,3)],killer_name,victim_name)
|
||||
@ -713,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[32], pnum
|
||||
new weapon[32], message[256], players[MAX_PLAYERS], pnum
|
||||
xmod_get_wpnname(wpnindex,weapon,31)
|
||||
|
||||
get_players(players,pnum,"c")
|
||||
@ -733,7 +731,7 @@ public client_death(killer,victim,wpnindex,hitplace,TK)
|
||||
|
||||
if ( wpnindex == DODW_MORTAR && MortarKill ){
|
||||
set_hudmessage(100, 100, 255, -1.0, 0.19, 0, 6.0, 6.0, 0.5, 0.15, -1)
|
||||
for (new i=1;i<=get_maxplayers();i++){
|
||||
for (new i=1;i<=MaxClients;i++){
|
||||
if ( g_Killers[i][0] && g_DeathStats[i] > get_gametime() )
|
||||
continue
|
||||
ShowSyncHudMsg(i, g_center2_sync, "%L",i,mortarmsg[random_num(0,1)],killer_name,victim_name)
|
||||
@ -763,14 +761,14 @@ public showDoubleKill(){
|
||||
new pos = g_KillCount - 2
|
||||
if ( pos > 2 ) pos = 2
|
||||
if ( DoubleKill ) {
|
||||
new name[32]
|
||||
new name[MAX_NAME_LENGTH]
|
||||
get_user_name(g_prevKillerId,name,31)
|
||||
if ( pos == 2 ){
|
||||
new kills[3]
|
||||
num_to_str(g_KillCount,kills,2)
|
||||
}
|
||||
set_hudmessage(65, 102, 158, -1.0, 0.25, 0, 6.0, 6.0, 0.5, 0.15, -1)
|
||||
for (new i=1;i<=get_maxplayers();i++){
|
||||
for (new i=1;i<=MaxClients;i++){
|
||||
if ( g_Killers[i][0] && g_DeathStats[i] > get_gametime() )
|
||||
continue
|
||||
show_hudmessage(i,"%L",i,g_DoubleKillMsg[pos],name,g_KillCount)
|
||||
@ -788,11 +786,11 @@ public checkKills(param[]){
|
||||
a -= 3
|
||||
if ( a > -1 ){
|
||||
if ( MultiKill ) {
|
||||
new name[32]
|
||||
new name[MAX_NAME_LENGTH]
|
||||
get_user_name(id,name,31)
|
||||
set_hudmessage(255, 0, 100, 0.05, 0.65, 2, 0.02, 6.0, 0.01, 0.1, -1)
|
||||
if ( a > 6 ) a = 6
|
||||
for (new i=1;i<=get_maxplayers();i++){
|
||||
for (new i=1;i<=MaxClients;i++){
|
||||
if ( g_Killers[i][0] && g_DeathStats[i] > get_gametime() )
|
||||
continue
|
||||
ShowSyncHudMsg(i, g_left_sync, "%L",i,g_MultiKillMsg[a],name,g_multiKills[id][0],g_multiKills[id][1])
|
||||
@ -811,7 +809,7 @@ public checkKills(param[]){
|
||||
new LeaderScore
|
||||
new NumOfLeaders
|
||||
new LeaderID
|
||||
new PScore[33]
|
||||
new PScore[MAX_PLAYERS]
|
||||
|
||||
public client_disconnect(id) {
|
||||
if ( !LeadSounds || isDSMActive() ) return PLUGIN_CONTINUE
|
||||
@ -820,7 +818,7 @@ public client_disconnect(id) {
|
||||
PScore[id] = 0
|
||||
if ( NumOfLeaders == 0 ){
|
||||
LeaderScore = 0
|
||||
for ( new i=1; i<33; i++ )
|
||||
for ( new i=1; i<MAX_PLAYERS; i++ )
|
||||
if ( PScore[i] > LeaderScore ){
|
||||
|
||||
|
||||
@ -836,7 +834,7 @@ public client_disconnect(id) {
|
||||
else if ( NumOfLeaders == 1 )
|
||||
client_cmd( LeaderID,"spk misc/takenlead" )
|
||||
else if ( NumOfLeaders > 1 )
|
||||
for ( new i=1; i<33; i++ )
|
||||
for ( new i=1; i<MaxClients; i++ )
|
||||
if ( PScore[i] == LeaderScore )
|
||||
client_cmd( i,"spk misc/tiedlead")
|
||||
//else no players on server or have 0 score
|
||||
@ -847,7 +845,7 @@ public client_disconnect(id) {
|
||||
client_cmd( LeaderID,"spk misc/takenlead" )
|
||||
}
|
||||
else {
|
||||
for ( new i=1; i<33; i++ )
|
||||
for ( new i=1; i<MAX_PLAYERS; i++ )
|
||||
if ( PScore[i] == LeaderScore ) client_cmd( i,"spk misc/takenlead" )
|
||||
}
|
||||
}
|
||||
@ -872,13 +870,13 @@ public get_score(){
|
||||
}
|
||||
else if ( NumOfLeaders > 1 ){
|
||||
|
||||
for ( new i=1; i<33; i++ )
|
||||
for ( new i=1; i<MAX_PLAYERS; i++ )
|
||||
if ( PScore[i] == LeaderScore && i != PlayerID )
|
||||
client_cmd( i,"spk misc/lostlead" )
|
||||
client_cmd( PlayerID,"spk misc/takenlead" )
|
||||
}
|
||||
else if ( NumOfLeaders == 0 ){ // start
|
||||
for ( new i=1; i<33; i++ )
|
||||
for ( new i=1; i<MAX_PLAYERS; i++ )
|
||||
if ( i != PlayerID && is_user_connected(i) ) client_cmd( i,"spk misc/lostlead" )
|
||||
client_cmd( PlayerID,"spk misc/takenlead" )
|
||||
}
|
||||
@ -913,7 +911,7 @@ public cmdStatsMe(id){
|
||||
}
|
||||
|
||||
displayStats_steam(id,dest) {
|
||||
new name[32], stats[9], body[8]
|
||||
new name[MAX_NAME_LENGTH], stats[9], body[8]
|
||||
get_user_wstats(id,0,stats,body)
|
||||
|
||||
new pos = copy(g_Buffer,2047,"<html><head><style type=^"text/css^">pre{color:#FFB000;}body{background:Black;margin-left:8px;margin-top:0px; color:#FFB000;}</style></head><pre><body>")
|
||||
@ -952,7 +950,7 @@ public cmdRank(id){
|
||||
}
|
||||
|
||||
displayRank_steam(id,dest) {
|
||||
new name[32], stats[9], body[8]
|
||||
new name[MAX_NAME_LENGTH], stats[9], body[8]
|
||||
new rank_pos = get_user_stats(id,stats,body)
|
||||
|
||||
new pos = copy(g_Buffer,2047,"<html><head><style type=^"text/css^">pre{color:#FFB000;}body{background:Black;margin-left:8px;margin-top:0px;color:#FFB000;}</style></head><pre><body>")
|
||||
@ -991,7 +989,7 @@ public cmdTop15(id) {
|
||||
|
||||
/* get top 15 */
|
||||
getTop15_steam(id){
|
||||
new stats[9], body[8], name[32]
|
||||
new stats[9], body[8], name[MAX_NAME_LENGTH]
|
||||
|
||||
new pos = copy(g_Buffer,2047,"<html><head><meta charset=utf-8><style type=^"text/css^">pre{color:#FFB000;}body{background:Black;margin-left:8px;margin-top:0px;color:#FFB000;}</style></head><pre><body>")
|
||||
|
||||
|
@ -8,8 +8,8 @@
|
||||
#include <amxmodx>
|
||||
#include <dodx>
|
||||
|
||||
new g_pingSum[33]
|
||||
new g_pingCount[33]
|
||||
new g_pingSum[MAX_PLAYERS]
|
||||
new g_pingCount[MAX_PLAYERS]
|
||||
|
||||
public plugin_init()
|
||||
register_plugin("Stats Logging",AMXX_VERSION_STR,"AMXX Dev Team")
|
||||
@ -17,7 +17,7 @@ public plugin_init()
|
||||
public client_disconnect(id) {
|
||||
if ( is_user_bot( id ) || !is_user_connected(id) || !isDSMActive() ) return PLUGIN_CONTINUE
|
||||
remove_task( id )
|
||||
new szTeam[16],szName[32],szAuthid[32], iStats[9], iHits[8], szWeapon[16]
|
||||
new szTeam[16],szName[MAX_NAME_LENGTH],szAuthid[32], iStats[9], iHits[8], szWeapon[16]
|
||||
new iUserid = get_user_userid( id )
|
||||
get_user_info(id,"team", szTeam, 15 )
|
||||
szTeam[0] -= 32;
|
||||
|
@ -111,7 +111,7 @@ stock cmd_target(id,const arg[],flags = CMDTARGET_OBEY_IMMUNITY)
|
||||
if ((get_user_flags(player) & ADMIN_IMMUNITY) &&
|
||||
((flags & CMDTARGET_ALLOW_SELF) ? (id != player) : true) )
|
||||
{
|
||||
new imname[32];
|
||||
new imname[MAX_NAME_LENGTH];
|
||||
get_user_name(player,imname,31);
|
||||
console_print(id,"%L",id,"CLIENT_IMM",imname);
|
||||
return 0;
|
||||
@ -121,7 +121,7 @@ stock cmd_target(id,const arg[],flags = CMDTARGET_OBEY_IMMUNITY)
|
||||
{
|
||||
if (!is_user_alive(player))
|
||||
{
|
||||
new imname[32];
|
||||
new imname[MAX_NAME_LENGTH];
|
||||
get_user_name(player,imname,31);
|
||||
console_print(id,"%L",id,"CANT_PERF_DEAD",imname);
|
||||
return 0;
|
||||
@ -131,7 +131,7 @@ stock cmd_target(id,const arg[],flags = CMDTARGET_OBEY_IMMUNITY)
|
||||
{
|
||||
if (is_user_bot(player))
|
||||
{
|
||||
new imname[32];
|
||||
new imname[MAX_NAME_LENGTH];
|
||||
get_user_name(player,imname,31);
|
||||
console_print(id,"%L",id,"CANT_PERF_BOT",imname);
|
||||
return 0;
|
||||
@ -178,10 +178,7 @@ stock show_activity( id, const name[], const fmt[], any:... )
|
||||
{
|
||||
case 5: // hide name only to admins, show nothing to normal users
|
||||
{
|
||||
new __maxclients=get_maxplayers();
|
||||
|
||||
|
||||
for (new i=1; i<=__maxclients; i++)
|
||||
for (new i=1; i<=MaxClients; i++)
|
||||
{
|
||||
if (is_user_connected(i))
|
||||
{
|
||||
@ -194,9 +191,7 @@ stock show_activity( id, const name[], const fmt[], any:... )
|
||||
}
|
||||
case 4: // show name only to admins, show nothing to normal users
|
||||
{
|
||||
new __maxclients=get_maxplayers();
|
||||
|
||||
for (new i=1; i<=__maxclients; i++)
|
||||
for (new i=1; i<=MaxClients; i++)
|
||||
{
|
||||
if (is_user_connected(i))
|
||||
{
|
||||
@ -209,9 +204,7 @@ stock show_activity( id, const name[], const fmt[], any:... )
|
||||
}
|
||||
case 3: // show name only to admins, hide name from normal users
|
||||
{
|
||||
new __maxclients=get_maxplayers();
|
||||
|
||||
for (new i=1; i<=__maxclients; i++)
|
||||
for (new i=1; i<=MaxClients; i++)
|
||||
{
|
||||
if (is_user_connected(i))
|
||||
{
|
||||
@ -350,12 +343,10 @@ stock show_activity_key(const KeyWithoutName[], const KeyWithName[], const ___Ad
|
||||
new keyfmt[256];
|
||||
new i;
|
||||
|
||||
new __maxclients=get_maxplayers();
|
||||
|
||||
switch( get_pcvar_num(__amx_show_activity) )
|
||||
{
|
||||
case 5: // hide name to admins, display nothing to normal players
|
||||
while (i++ < __maxclients)
|
||||
while (i++ < MaxClients)
|
||||
{
|
||||
if ( is_user_connected(i) )
|
||||
{
|
||||
@ -370,7 +361,7 @@ stock show_activity_key(const KeyWithoutName[], const KeyWithName[], const ___Ad
|
||||
}
|
||||
}
|
||||
case 4: // show name only to admins, display nothing to normal players
|
||||
while (i++ < __maxclients)
|
||||
while (i++ < MaxClients)
|
||||
{
|
||||
if ( is_user_connected(i) )
|
||||
{
|
||||
@ -383,7 +374,7 @@ stock show_activity_key(const KeyWithoutName[], const KeyWithName[], const ___Ad
|
||||
}
|
||||
}
|
||||
case 3: // show name only to admins, hide name from normal users
|
||||
while (i++ < __maxclients)
|
||||
while (i++ < MaxClients)
|
||||
{
|
||||
if ( is_user_connected(i) )
|
||||
{
|
||||
@ -403,7 +394,7 @@ stock show_activity_key(const KeyWithoutName[], const KeyWithName[], const ___Ad
|
||||
}
|
||||
}
|
||||
case 2: // show name to all users
|
||||
while (i++ < __maxclients)
|
||||
while (i++ < MaxClients)
|
||||
{
|
||||
if ( is_user_connected(i) )
|
||||
{
|
||||
@ -413,7 +404,7 @@ stock show_activity_key(const KeyWithoutName[], const KeyWithName[], const ___Ad
|
||||
}
|
||||
}
|
||||
case 1: // hide name from all users
|
||||
while (i++ < __maxclients)
|
||||
while (i++ < MaxClients)
|
||||
{
|
||||
if ( is_user_connected(i) )
|
||||
{
|
||||
|
@ -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[32], &num ,const flags[]="", const team[]="");
|
||||
native get_players(players[MAX_PLAYERS], &num ,const flags[]="", const team[]="");
|
||||
|
||||
/* Gets argument from command. */
|
||||
native read_argv(id,output[],len);
|
||||
|
@ -884,7 +884,7 @@
|
||||
{
|
||||
new maxplayers = get_cvar_num("sv_visiblemaxplayers");
|
||||
if (maxplayers <= 0)
|
||||
maxplayers = get_maxplayers();
|
||||
maxplayers = MaxClients;
|
||||
|
||||
return (get_playersnum(1) <= maxplayers-num) ? true : false;
|
||||
}
|
||||
|
@ -125,7 +125,7 @@ public countVote(id, key)
|
||||
{
|
||||
if (get_cvar_float("amx_vote_answers"))
|
||||
{
|
||||
new name[32]
|
||||
new name[MAX_NAME_LENGTH]
|
||||
get_user_name(id, name, 31)
|
||||
|
||||
if (key == SELECTMAPS)
|
||||
|
@ -37,12 +37,12 @@
|
||||
|
||||
new Array:g_mapName;
|
||||
new g_mapNums
|
||||
new g_menuPosition[33]
|
||||
new g_menuPosition[MAX_PLAYERS]
|
||||
|
||||
new g_voteCount[5]
|
||||
|
||||
new g_voteSelected[33][4]
|
||||
new g_voteSelectedNum[33]
|
||||
new g_voteSelected[MAX_PLAYERS][4]
|
||||
new g_voteSelectedNum[MAX_PLAYERS]
|
||||
|
||||
new g_coloredMenus
|
||||
|
||||
@ -118,7 +118,7 @@ public actionResult(id, key)
|
||||
public checkVotes(id)
|
||||
{
|
||||
id -= 34567
|
||||
new num, ppl[32], a = 0
|
||||
new num, ppl[MAX_PLAYERS], a = 0
|
||||
|
||||
get_players(ppl, num, "c")
|
||||
if (num == 0) num = 1
|
||||
@ -190,7 +190,7 @@ public voteCount(id, key)
|
||||
|
||||
if (get_cvar_float("amx_vote_answers"))
|
||||
{
|
||||
new name[32]
|
||||
new name[MAX_NAME_LENGTH]
|
||||
|
||||
get_user_name(id, name, 31)
|
||||
client_print(0, print_chat, "%L", LANG_PLAYER, "X_VOTED_FOR", name, key + 1)
|
||||
@ -353,7 +353,7 @@ public actionVoteMapMenu(id, key)
|
||||
set_task(vote_time, "checkVotes", 34567 + id)
|
||||
|
||||
new menuBody[512]
|
||||
new players[32]
|
||||
new players[MAX_PLAYERS]
|
||||
new pnum, keys, len
|
||||
|
||||
get_players(players, pnum)
|
||||
@ -388,7 +388,7 @@ public actionVoteMapMenu(id, key)
|
||||
keys |= MENU_KEY_0
|
||||
show_menu(id, keys, menuBody, iVoteTime, menuName)
|
||||
|
||||
new authid[32], name[32]
|
||||
new authid[32], name[MAX_NAME_LENGTH]
|
||||
|
||||
get_user_authid(id, authid, 31)
|
||||
get_user_name(id, name, 31)
|
||||
@ -466,7 +466,7 @@ public actionMapsMenu(id, key)
|
||||
message_end()
|
||||
}
|
||||
|
||||
new authid[32], name[32]
|
||||
new authid[32], name[MAX_NAME_LENGTH]
|
||||
|
||||
get_user_authid(id, authid, 31)
|
||||
get_user_name(id, name, 31)
|
||||
|
@ -41,7 +41,7 @@
|
||||
#define MENUITEMSPERPAGE 8
|
||||
//#define MENUS_NUMBER 16
|
||||
|
||||
new g_menuPosition[33]
|
||||
new g_menuPosition[MAX_PLAYERS]
|
||||
new g_menusNumber = 0
|
||||
new g_menuBody[MAXMENUS][STRINGSIZE]
|
||||
new bool:g_menuBodyPhrase[MAXMENUS]
|
||||
@ -51,7 +51,7 @@ new g_menuPlugin[MAXMENUS][STRINGSIZE]
|
||||
|
||||
new g_coloredMenus
|
||||
|
||||
new g_clientMenuPosition[33]
|
||||
new g_clientMenuPosition[MAX_PLAYERS]
|
||||
new g_clientMenusNumber = 0
|
||||
new g_clientMenuBody[MAXMENUS][STRINGSIZE]
|
||||
new bool:g_clientMenuBodyPhrase[MAXMENUS]
|
||||
|
@ -36,7 +36,7 @@
|
||||
|
||||
#define DISPLAY_MSG // Comment to disable message on join
|
||||
|
||||
new g_menuLang[33][2]
|
||||
new g_menuLang[MAX_PLAYERS][2]
|
||||
new g_serverLang
|
||||
new g_langNum
|
||||
new g_coloredMenus
|
||||
|
@ -39,18 +39,16 @@
|
||||
#define CHECK_FREQ 5 // This is also the warning message frequency.
|
||||
#define CLASS_GESTATE 9
|
||||
|
||||
new g_oldangles[33][3]
|
||||
new g_idletime[33]
|
||||
new bool:g_spawned[33] = {true, ...}
|
||||
new g_class[33] // stored info from the "ScoreInfo" message
|
||||
new g_oldangles[MAX_PLAYERS][3]
|
||||
new g_idletime[MAX_PLAYERS]
|
||||
new bool:g_spawned[MAX_PLAYERS] = {true, ...}
|
||||
new g_class[MAX_PLAYERS] // stored info from the "ScoreInfo" message
|
||||
|
||||
new mp_tournamentmode;
|
||||
new amx_idle_time;
|
||||
new amx_idle_min_players;
|
||||
new amx_idle_ignore_immunity;
|
||||
|
||||
new maxplayers;
|
||||
|
||||
public plugin_init() {
|
||||
register_plugin("Idle Player Remover",AMXX_VERSION_STR,"AMXX Dev Team")
|
||||
|
||||
@ -71,15 +69,12 @@ public plugin_init() {
|
||||
{
|
||||
register_event("ScoreInfo","msgScoreInfo","a")
|
||||
}
|
||||
|
||||
|
||||
maxplayers=get_maxplayers();
|
||||
}
|
||||
|
||||
public checkPlayers() {
|
||||
if (get_pcvar_num(mp_tournamentmode)) return PLUGIN_HANDLED
|
||||
|
||||
for (new i = 1; i <= maxplayers; i++) {
|
||||
for (new i = 1; i <= MaxClients; i++) {
|
||||
if (is_user_alive(i) && g_class[i]!=CLASS_GESTATE && is_user_connected(i) && !is_user_bot(i) && !is_user_hltv(i) && g_spawned[i]) {
|
||||
if ( !get_pcvar_num(amx_idle_ignore_immunity) ) {
|
||||
if ( access(i, ADMIN_IMMUNITY) ) continue
|
||||
@ -116,7 +111,7 @@ check_idletime(id) {
|
||||
new timeleft = maxidletime - g_idletime[id]
|
||||
client_print(id, print_chat, "[AMXX] You have %d seconds to move or you will be kicked for being idle", timeleft)
|
||||
} else if (g_idletime[id] > maxidletime) {
|
||||
new name[32]
|
||||
new name[MAX_NAME_LENGTH]
|
||||
get_user_name(id, name, 31)
|
||||
client_print(0, print_chat, "[AMXX] %s was kicked for being idle longer than %d seconds", name, maxidletime)
|
||||
log_amx("%s was kicked for being idle longer than %d seconds", name, maxidletime)
|
||||
|
@ -71,8 +71,8 @@ enum {
|
||||
};
|
||||
|
||||
|
||||
new g_Class[33]; // stored info from the "ScoreInfo" message
|
||||
new g_Team[33];
|
||||
new g_Class[MAX_PLAYERS]; // stored info from the "ScoreInfo" message
|
||||
new g_Team[MAX_PLAYERS];
|
||||
|
||||
new g_ScoreInfo_Class;
|
||||
new g_ScoreInfo_Team;
|
||||
@ -102,7 +102,7 @@ public plugin_init() {
|
||||
|
||||
// clear class info..
|
||||
new i=0;
|
||||
while (i<33) {
|
||||
while (i<MAX_PLAYERS) {
|
||||
g_Class[i]=0;
|
||||
g_Team[i]=-1;
|
||||
i++;
|
||||
@ -152,7 +152,7 @@ stock UTIL_FindCommander() {
|
||||
|
||||
}
|
||||
stock UTIL_IsSpectator(id) {
|
||||
if (id<1||id>get_maxplayers())
|
||||
if (id<1||id>MaxClients)
|
||||
return -1;
|
||||
if (g_Class[id]==PLAYERCLASS_SPECTATOR)
|
||||
return 1;
|
||||
@ -167,7 +167,7 @@ public cmdRandom(id,level,cid) {
|
||||
read_argv(1,arg,31)
|
||||
new player = cmd_target(id,arg,CMDTARGET_OBEY_IMMUNITY | CMDTARGET_ALLOW_SELF)
|
||||
if (!player) return PLUGIN_HANDLED
|
||||
new name[32],name_targ[32];
|
||||
new name[MAX_NAME_LENGTH],name_targ[MAX_NAME_LENGTH];
|
||||
new auth[32],auth_targ[32];
|
||||
get_user_name(id,name,31);
|
||||
get_user_name(player,name_targ,31);
|
||||
@ -182,7 +182,7 @@ public cmdRandom(id,level,cid) {
|
||||
else {
|
||||
new cur=0;
|
||||
new i=1;
|
||||
while (i<get_maxplayers()) {
|
||||
while (i<MaxClients) {
|
||||
if (is_user_connected(i)) {
|
||||
if (!(get_user_flags(i) & ADMIN_IMMUNITY)) {
|
||||
if (g_Team[i] == 0) {
|
||||
@ -193,7 +193,7 @@ public cmdRandom(id,level,cid) {
|
||||
i++;
|
||||
}
|
||||
if (cur) {
|
||||
new name[32],auth[32];
|
||||
new name[MAX_NAME_LENGTH],auth[32];
|
||||
get_user_name(id,name,31);
|
||||
get_user_authid(id,auth,31);
|
||||
log_amx("Cmd: ^"%s<%d><%s><>^" random all",name,get_user_userid(id),auth);
|
||||
@ -215,7 +215,7 @@ public randomStep(index) {
|
||||
if (g_Team[index] == 0 && !(get_user_flags(index) & ADMIN_IMMUNITY)) {
|
||||
client_cmd(index, "%s", g_AutoAssignAck);
|
||||
}
|
||||
if (++index > get_maxplayers()) {
|
||||
if (++index > MaxClients) {
|
||||
return PLUGIN_HANDLED_MAIN
|
||||
}
|
||||
}
|
||||
@ -233,7 +233,7 @@ public cmdReadyRoom(id,level,cid) {
|
||||
read_argv(1,arg,31)
|
||||
new player = cmd_target(id,arg,CMDTARGET_OBEY_IMMUNITY | CMDTARGET_ALLOW_SELF)
|
||||
if (!player) return PLUGIN_HANDLED
|
||||
new name[32],name_targ[32];
|
||||
new name[MAX_NAME_LENGTH],name_targ[MAX_NAME_LENGTH];
|
||||
new auth[32],auth_targ[32];
|
||||
get_user_name(id,name,31);
|
||||
get_user_name(player,name_targ,31);
|
||||
@ -248,7 +248,7 @@ public cmdReadyRoom(id,level,cid) {
|
||||
else {
|
||||
new cur=0;
|
||||
new i=1;
|
||||
while (i<get_maxplayers()) {
|
||||
while (i<MaxClients) {
|
||||
if (is_user_connected(i)) {
|
||||
if (UTIL_IsSpectator(i) == 1 || g_Team[i] != 0) {
|
||||
cur++;
|
||||
@ -257,7 +257,7 @@ public cmdReadyRoom(id,level,cid) {
|
||||
i++;
|
||||
}
|
||||
if (cur) {
|
||||
new name[32],auth[32];
|
||||
new name[MAX_NAME_LENGTH],auth[32];
|
||||
get_user_name(id,name,31);
|
||||
get_user_authid(id,auth,31);
|
||||
log_amx("Cmd: ^"%s<%d><%s><>^" ready room all",name,get_user_userid(id),auth);
|
||||
@ -279,7 +279,7 @@ public rrStep(index) {
|
||||
if (is_user_connected(index) && g_Team[index]!=0) {
|
||||
client_cmd(index, "%s", g_ReadyRoomAck)
|
||||
}
|
||||
if (++index > get_maxplayers()) {
|
||||
if (++index > MaxClients) {
|
||||
return PLUGIN_HANDLED_MAIN
|
||||
}
|
||||
}
|
||||
@ -300,7 +300,7 @@ public cmdTeamTwo(id,level,cid) {
|
||||
client_print(id,print_chat,"[AMXX] That user is already on team two.");
|
||||
return PLUGIN_HANDLED_MAIN;
|
||||
}
|
||||
new name[32],name_targ[32];
|
||||
new name[MAX_NAME_LENGTH],name_targ[MAX_NAME_LENGTH];
|
||||
new auth[32],auth_targ[32];
|
||||
get_user_name(id,name,31);
|
||||
get_user_name(player,name_targ,31);
|
||||
@ -328,7 +328,7 @@ public cmdTeamOne(id,level,cid) {
|
||||
client_print(id,print_chat,"[AMXX] That user is already on team one.");
|
||||
return PLUGIN_HANDLED_MAIN;
|
||||
}
|
||||
new name[32],name_targ[32];
|
||||
new name[MAX_NAME_LENGTH],name_targ[MAX_NAME_LENGTH];
|
||||
new auth[32],auth_targ[32];
|
||||
get_user_name(id,name,31);
|
||||
get_user_name(player,name_targ,31);
|
||||
@ -350,9 +350,9 @@ public cmdUnComm(id,level,cid) {
|
||||
if (!cmd_access(id,level,cid,1))
|
||||
return PLUGIN_HANDLED
|
||||
new comm = UTIL_FindCommander();
|
||||
if (comm>0&&comm<=get_maxplayers()) {
|
||||
if (comm>0&&comm<=MaxClients) {
|
||||
client_cmd(comm, "%s", g_StopCommAck);
|
||||
new name[32],name_targ[32];
|
||||
new name[MAX_NAME_LENGTH],name_targ[MAX_NAME_LENGTH];
|
||||
new auth[32],auth_targ[32];
|
||||
get_user_name(id,name,31);
|
||||
get_user_name(comm,name_targ,31);
|
||||
|
@ -36,14 +36,14 @@
|
||||
#include <amxmisc>
|
||||
#include <ns>
|
||||
|
||||
new g_menuPosition[33]
|
||||
new g_menuPlayers[33][32]
|
||||
new g_menuPlayersNum[33]
|
||||
new g_menuOption[33]
|
||||
new g_menuSettings[33]
|
||||
new g_menuPosition[MAX_PLAYERS]
|
||||
new g_menuPlayers[MAX_PLAYERS][MAX_PLAYERS]
|
||||
new g_menuPlayersNum[MAX_PLAYERS]
|
||||
new g_menuOption[MAX_PLAYERS]
|
||||
new g_menuSettings[MAX_PLAYERS]
|
||||
|
||||
new g_menuSelect[33][64]
|
||||
new g_menuSelectNum[33]
|
||||
new g_menuSelect[MAX_PLAYERS][64]
|
||||
new g_menuSelectNum[MAX_PLAYERS]
|
||||
|
||||
#define MAX_CLCMDS 24
|
||||
|
||||
@ -325,7 +325,7 @@ public actionBanMenu(id, key)
|
||||
return PLUGIN_HANDLED
|
||||
}
|
||||
new player = g_menuPlayers[id][g_menuPosition[id] * 7 + key]
|
||||
new name[32], name2[32], authid[32], authid2[32]
|
||||
new name[MAX_NAME_LENGTH], name2[MAX_NAME_LENGTH], authid[32], authid2[32]
|
||||
|
||||
get_user_name(player, name2, 31)
|
||||
get_user_authid(id, authid, 31)
|
||||
@ -338,8 +338,7 @@ public actionBanMenu(id, key)
|
||||
|
||||
if ( !banTime ) // permanent
|
||||
{
|
||||
new maxpl = get_maxplayers();
|
||||
for (new i = 1; i <= maxpl; i++)
|
||||
for (new i = 1; i <= MaxClients; i++)
|
||||
{
|
||||
show_activity_id(i, id, name, "%L %s %L", i, "BAN", name2, i, "PERM");
|
||||
}
|
||||
@ -348,8 +347,7 @@ public actionBanMenu(id, key)
|
||||
{
|
||||
new tempTime[32];
|
||||
formatex(tempTime,sizeof(tempTime)-1,"%d",banTime);
|
||||
new maxpl = get_maxplayers();
|
||||
for (new i = 1; i <= maxpl; i++)
|
||||
for (new i = 1; i <= MaxClients; i++)
|
||||
{
|
||||
show_activity_id(i, id, name, "%L %s %L", i, "BAN", name2, i, "FOR_MIN", tempTime);
|
||||
}
|
||||
@ -400,7 +398,7 @@ displayBanMenu(id, pos)
|
||||
new menuBody[512]
|
||||
new b = 0
|
||||
new i
|
||||
new name[32]
|
||||
new name[MAX_NAME_LENGTH]
|
||||
new start = pos * 7
|
||||
|
||||
if (start >= g_menuPlayersNum[id])
|
||||
@ -491,7 +489,7 @@ public actionSlapMenu(id, key)
|
||||
default:
|
||||
{
|
||||
new player = g_menuPlayers[id][g_menuPosition[id] * 7 + key]
|
||||
new name2[32]
|
||||
new name2[MAX_NAME_LENGTH]
|
||||
|
||||
get_user_name(player, name2, 31)
|
||||
|
||||
@ -502,7 +500,7 @@ public actionSlapMenu(id, key)
|
||||
return PLUGIN_HANDLED
|
||||
}
|
||||
|
||||
new authid[32], authid2[32], name[32]
|
||||
new authid[32], authid2[32], name[MAX_NAME_LENGTH]
|
||||
|
||||
get_user_authid(id, authid, 31)
|
||||
get_user_authid(player, authid2, 31)
|
||||
@ -541,7 +539,7 @@ displaySlapMenu(id, pos)
|
||||
new menuBody[512]
|
||||
new b = 0
|
||||
new i
|
||||
new name[32], team[4]
|
||||
new name[MAX_NAME_LENGTH], team[4]
|
||||
new start = pos * 7
|
||||
|
||||
if (start >= g_menuPlayersNum[id])
|
||||
@ -624,7 +622,7 @@ public actionKickMenu(id, key)
|
||||
default:
|
||||
{
|
||||
new player = g_menuPlayers[id][g_menuPosition[id] * 8 + key]
|
||||
new authid[32], authid2[32], name[32], name2[32]
|
||||
new authid[32], authid2[32], name[MAX_NAME_LENGTH], name2[MAX_NAME_LENGTH]
|
||||
|
||||
get_user_authid(id, authid, 31)
|
||||
get_user_authid(player, authid2, 31)
|
||||
@ -658,7 +656,7 @@ displayKickMenu(id, pos)
|
||||
new menuBody[512]
|
||||
new b = 0
|
||||
new i
|
||||
new name[32]
|
||||
new name[MAX_NAME_LENGTH]
|
||||
new start = pos * 8
|
||||
|
||||
if (start >= g_menuPlayersNum[id])
|
||||
@ -728,7 +726,7 @@ public actionTeamMenu(id, key)
|
||||
default:
|
||||
{
|
||||
new player = g_menuPlayers[id][g_menuPosition[id] * 7 + key]
|
||||
new authid[32], authid2[32], name[32], name2[32]
|
||||
new authid[32], authid2[32], name[MAX_NAME_LENGTH], name2[MAX_NAME_LENGTH]
|
||||
|
||||
get_user_name(player, name2, 31)
|
||||
get_user_authid(id, authid, 31)
|
||||
@ -762,7 +760,7 @@ displayTeamMenu(id, pos)
|
||||
new menuBody[512]
|
||||
new b = 0
|
||||
new i, iteam
|
||||
new name[32], team[4]
|
||||
new name[MAX_NAME_LENGTH], team[4]
|
||||
new start = pos * 7
|
||||
|
||||
if (start >= g_menuPlayersNum[id])
|
||||
@ -843,7 +841,7 @@ public actionClcmdMenu(id, key)
|
||||
|
||||
if (is_user_connected(player))
|
||||
{
|
||||
new command[64], authid[32], name[32], userid[32]
|
||||
new command[64], authid[32], name[MAX_NAME_LENGTH], userid[32]
|
||||
|
||||
copy(command, 63, g_clcmdCmd[g_menuSelect[id][g_menuOption[id]]])
|
||||
get_user_authid(player, authid, 31)
|
||||
@ -882,7 +880,7 @@ displayClcmdMenu(id, pos)
|
||||
new menuBody[512]
|
||||
new b = 0
|
||||
new i
|
||||
new name[32]
|
||||
new name[MAX_NAME_LENGTH]
|
||||
new start = pos * 7
|
||||
|
||||
if (start >= g_menuPlayersNum[id])
|
||||
|
@ -38,7 +38,7 @@
|
||||
#define MAX_ATTEMPTS 128 // How many times to search in an area for a free space
|
||||
#define BLOCKED_MASKS MASK_PLAYER_STUNNED | MASK_ENSNARED | MASK_ALIEN_EMBRYO
|
||||
|
||||
new Float:g_lastcmdtime[33]
|
||||
new Float:g_lastcmdtime[MAX_PLAYERS]
|
||||
|
||||
new amx_unstuck_frequency;
|
||||
|
||||
|
@ -42,7 +42,7 @@
|
||||
|
||||
#define MAX_SYSTEM 32
|
||||
|
||||
new g_menuPos[33]
|
||||
new g_menuPos[MAX_PLAYERS]
|
||||
new g_fileToSave[64]
|
||||
new g_coloredMenus
|
||||
new g_Modified
|
||||
|
@ -40,14 +40,14 @@
|
||||
#include <cstrike>
|
||||
#include <fakemeta>
|
||||
|
||||
new g_menuPosition[33]
|
||||
new g_menuPlayers[33][32]
|
||||
new g_menuPlayersNum[33]
|
||||
new g_menuOption[33]
|
||||
new g_menuSettings[33]
|
||||
new g_menuPosition[MAX_PLAYERS]
|
||||
new g_menuPlayers[MAX_PLAYERS][MAX_PLAYERS]
|
||||
new g_menuPlayersNum[MAX_PLAYERS]
|
||||
new g_menuOption[MAX_PLAYERS]
|
||||
new g_menuSettings[MAX_PLAYERS]
|
||||
|
||||
new g_menuSelect[33][64]
|
||||
new g_menuSelectNum[33]
|
||||
new g_menuSelect[MAX_PLAYERS][64]
|
||||
new g_menuSelectNum[MAX_PLAYERS]
|
||||
|
||||
#define MAX_CLCMDS 24
|
||||
|
||||
@ -79,7 +79,7 @@ new g_CSTeamiNumbers[3] = {
|
||||
3
|
||||
}
|
||||
|
||||
new g_CSPlayerCanSwitchFromSpec[33]
|
||||
new g_CSPlayerCanSwitchFromSpec[MAX_PLAYERS]
|
||||
new g_transferingAdmin
|
||||
|
||||
new allow_spectators, mp_limitteams
|
||||
@ -273,7 +273,7 @@ public actionBanMenu(id, key)
|
||||
return PLUGIN_HANDLED
|
||||
}
|
||||
new player = g_menuPlayers[id][g_menuPosition[id] * 7 + key]
|
||||
new name[32], name2[32], authid[32], authid2[32]
|
||||
new name[MAX_NAME_LENGTH], name2[MAX_NAME_LENGTH], authid[32], authid2[32]
|
||||
|
||||
get_user_name(player, name2, 31)
|
||||
get_user_authid(id, authid, 31)
|
||||
@ -286,8 +286,7 @@ public actionBanMenu(id, key)
|
||||
|
||||
if ( !banTime ) // permanent
|
||||
{
|
||||
new maxpl = get_maxplayers();
|
||||
for (new i = 1; i <= maxpl; i++)
|
||||
for (new i = 1; i <= MaxClients; i++)
|
||||
{
|
||||
show_activity_id(i, id, name, "%L %s %L", i, "BAN", name2, i, "PERM");
|
||||
}
|
||||
@ -296,8 +295,7 @@ public actionBanMenu(id, key)
|
||||
{
|
||||
new tempTime[32];
|
||||
formatex(tempTime,sizeof(tempTime)-1,"%d",banTime);
|
||||
new maxpl = get_maxplayers();
|
||||
for (new i = 1; i <= maxpl; i++)
|
||||
for (new i = 1; i <= MaxClients; i++)
|
||||
{
|
||||
show_activity_id(i, id, name, "%L %s %L", i, "BAN", name2, i, "FOR_MIN", tempTime);
|
||||
}
|
||||
@ -348,7 +346,7 @@ displayBanMenu(id, pos)
|
||||
new menuBody[512]
|
||||
new b = 0
|
||||
new i
|
||||
new name[32]
|
||||
new name[MAX_NAME_LENGTH]
|
||||
new start = pos * 7
|
||||
|
||||
if (start >= g_menuPlayersNum[id])
|
||||
@ -442,7 +440,7 @@ public actionSlapMenu(id, key)
|
||||
default:
|
||||
{
|
||||
new player = g_menuPlayers[id][g_menuPosition[id] * 7 + key]
|
||||
new name2[32]
|
||||
new name2[MAX_NAME_LENGTH]
|
||||
|
||||
get_user_name(player, name2, 31)
|
||||
|
||||
@ -453,7 +451,7 @@ public actionSlapMenu(id, key)
|
||||
return PLUGIN_HANDLED
|
||||
}
|
||||
|
||||
new authid[32], authid2[32], name[32]
|
||||
new authid[32], authid2[32], name[MAX_NAME_LENGTH]
|
||||
|
||||
get_user_authid(id, authid, 31)
|
||||
get_user_authid(player, authid2, 31)
|
||||
@ -492,7 +490,7 @@ displaySlapMenu(id, pos)
|
||||
new menuBody[512]
|
||||
new b = 0
|
||||
new i
|
||||
new name[32], team[4]
|
||||
new name[MAX_NAME_LENGTH], team[4]
|
||||
new start = pos * 7
|
||||
|
||||
if (start >= g_menuPlayersNum[id])
|
||||
@ -592,7 +590,7 @@ public actionKickMenu(id, key)
|
||||
default:
|
||||
{
|
||||
new player = g_menuPlayers[id][g_menuPosition[id] * 8 + key]
|
||||
new authid[32], authid2[32], name[32], name2[32]
|
||||
new authid[32], authid2[32], name[MAX_NAME_LENGTH], name2[MAX_NAME_LENGTH]
|
||||
|
||||
get_user_authid(id, authid, 31)
|
||||
get_user_authid(player, authid2, 31)
|
||||
@ -626,7 +624,7 @@ displayKickMenu(id, pos)
|
||||
new menuBody[512]
|
||||
new b = 0
|
||||
new i
|
||||
new name[32]
|
||||
new name[MAX_NAME_LENGTH]
|
||||
new start = pos * 8
|
||||
|
||||
if (start >= g_menuPlayersNum[id])
|
||||
@ -701,7 +699,7 @@ public Event_TextMsg( id ) // #Only_1_Team_Change
|
||||
{
|
||||
if( g_transferingAdmin && is_user_connected(id) && (id == g_transferingAdmin || is_user_connected(g_transferingAdmin)) )
|
||||
{
|
||||
new name[32]
|
||||
new name[MAX_NAME_LENGTH]
|
||||
get_user_name(id, name, charsmax(name))
|
||||
client_print(g_transferingAdmin, print_chat, "%L", g_transferingAdmin, "CANT_PERF_PLAYER", name);
|
||||
}
|
||||
@ -729,7 +727,7 @@ public actionTeamMenu(id, key)
|
||||
|
||||
g_transferingAdmin = id
|
||||
|
||||
new authid[32], authid2[32], name[32], name2[32]
|
||||
new authid[32], authid2[32], name[MAX_NAME_LENGTH], name2[MAX_NAME_LENGTH]
|
||||
|
||||
get_user_name(player, name2, 31)
|
||||
get_user_authid(id, authid, 31)
|
||||
@ -838,7 +836,7 @@ displayTeamMenu(id, pos)
|
||||
new menuBody[512]
|
||||
new b = 0
|
||||
new i, iteam
|
||||
new name[32], team[4]
|
||||
new name[MAX_NAME_LENGTH], team[4]
|
||||
new start = pos * 7
|
||||
|
||||
if (start >= g_menuPlayersNum[id])
|
||||
@ -947,7 +945,7 @@ public actionClcmdMenu(id, key)
|
||||
|
||||
if (is_user_connected(player))
|
||||
{
|
||||
new command[512], authid[32], name[32], userid[32]
|
||||
new command[512], authid[32], name[MAX_NAME_LENGTH], userid[32]
|
||||
|
||||
copy(command, charsmax(command), g_clcmdCmd[g_menuSelect[id][g_menuOption[id]]])
|
||||
get_user_authid(player, authid, 31)
|
||||
@ -986,7 +984,7 @@ displayClcmdMenu(id, pos)
|
||||
new menuBody[512]
|
||||
new b = 0
|
||||
new i
|
||||
new name[32]
|
||||
new name[MAX_NAME_LENGTH]
|
||||
new start = pos * 7
|
||||
|
||||
if (start >= g_menuPlayersNum[id])
|
||||
|
@ -40,25 +40,25 @@ new DisabledCallback;
|
||||
new EnabledCallback;
|
||||
|
||||
// pcvar that the client is currently modifying
|
||||
new CurrentCvar[33];
|
||||
new CurrentCvar[MAX_PLAYERS];
|
||||
|
||||
// Name of the cvar being modified
|
||||
new CurrentCvarName[33][32];
|
||||
new CurrentCvarName[MAX_PLAYERS][32];
|
||||
|
||||
// Plugin ID that the client is modifying
|
||||
new CurrentPlid[33];
|
||||
new CurrentPlid[MAX_PLAYERS];
|
||||
|
||||
// Page that the client is currently on
|
||||
new CurrentPage[33];
|
||||
new CurrentPage[MAX_PLAYERS];
|
||||
|
||||
// Menu function ID that the client is in
|
||||
new CurrentMenuFunction[33] = { -1,... };
|
||||
new CurrentMenuFunction[MAX_PLAYERS] = { -1,... };
|
||||
|
||||
new CurrentCommand[33][32];
|
||||
new CurrentCommand[MAX_PLAYERS][32];
|
||||
new cvarmenu_cmdid;
|
||||
new cmdmenu_cmdid;
|
||||
|
||||
new ExplicitPlugin[33];
|
||||
new ExplicitPlugin[MAX_PLAYERS];
|
||||
|
||||
public plugin_init()
|
||||
{
|
||||
@ -431,7 +431,7 @@ public CommandChangeCvar(id)
|
||||
|
||||
// Copy of admincmd's global output.
|
||||
|
||||
new Name[32];
|
||||
new Name[MAX_NAME_LENGTH];
|
||||
new AuthID[40];
|
||||
|
||||
get_user_name(id,Name,sizeof(Name)-1);
|
||||
@ -441,8 +441,7 @@ public CommandChangeCvar(id)
|
||||
|
||||
|
||||
new cvar_val[64];
|
||||
new maxpl = get_maxplayers();
|
||||
for (new i = 1; i <= maxpl; i++)
|
||||
for (new i = 1; i <= MaxClients; i++)
|
||||
{
|
||||
if (is_user_connected(i) && !is_user_bot(i))
|
||||
{
|
||||
|
@ -41,7 +41,7 @@ new g_menuData[MAX_MENU_DATA][32]
|
||||
new g_menuDataVar[MAX_MENU_DATA][32]
|
||||
new g_menuDataId[MAX_MENU_DATA]
|
||||
new g_menuDataNum
|
||||
new g_menuPosition[33]
|
||||
new g_menuPosition[MAX_PLAYERS]
|
||||
new g_fileToSave[64]
|
||||
new bool:g_modified
|
||||
new g_coloredMenus
|
||||
|
@ -38,7 +38,7 @@
|
||||
|
||||
#define MAX_PLAYERS 32 + 1
|
||||
new g_menuPosition[MAX_PLAYERS]
|
||||
new g_menuPlayers[MAX_PLAYERS][32]
|
||||
new g_menuPlayers[MAX_PLAYERS][MAX_PLAYERS]
|
||||
new g_menuPlayersNum[MAX_PLAYERS]
|
||||
new g_menuOption[MAX_PLAYERS] = {-1, ...}
|
||||
new Float:g_menuOrigin[MAX_PLAYERS][3]
|
||||
@ -89,7 +89,7 @@ public actionTelMenu(id, key)
|
||||
default:
|
||||
{
|
||||
new player = g_menuPlayers[id][g_menuPosition[id] * 6 + key]
|
||||
new name2[32]
|
||||
new name2[MAX_NAME_LENGTH]
|
||||
|
||||
get_user_name(player, name2, charsmax(name2))
|
||||
|
||||
@ -138,7 +138,7 @@ public actionTelMenu(id, key)
|
||||
doTeleport(player, origin, vAngle)
|
||||
}
|
||||
|
||||
new authid[32], authid2[32], name[32]
|
||||
new authid[32], authid2[32], name[MAX_NAME_LENGTH]
|
||||
|
||||
get_user_authid(id, authid, charsmax(authid))
|
||||
get_user_authid(player, authid2, charsmax(authid2))
|
||||
@ -178,7 +178,7 @@ displayTelMenu(id, pos)
|
||||
new menuBody[512]
|
||||
new b = 0
|
||||
new i
|
||||
new name[32]
|
||||
new name[MAX_NAME_LENGTH]
|
||||
new start = pos * 6
|
||||
new bool:blockMenu = (is_user_alive(id) && g_menuOption[id] < 1) ? true : false
|
||||
|
||||
|
@ -36,14 +36,14 @@
|
||||
#include <amxmisc>
|
||||
#include <tfcx>
|
||||
|
||||
new g_menuPosition[33]
|
||||
new g_menuPlayers[33][32]
|
||||
new g_menuPlayersNum[33]
|
||||
new g_menuOption[33]
|
||||
new g_menuSettings[33]
|
||||
new g_menuPosition[MAX_PLAYERS]
|
||||
new g_menuPlayers[MAX_PLAYERS][MAX_PLAYERS]
|
||||
new g_menuPlayersNum[MAX_PLAYERS]
|
||||
new g_menuOption[MAX_PLAYERS]
|
||||
new g_menuSettings[MAX_PLAYERS]
|
||||
|
||||
new g_menuSelect[33][64]
|
||||
new g_menuSelectNum[33]
|
||||
new g_menuSelect[MAX_PLAYERS][64]
|
||||
new g_menuSelectNum[MAX_PLAYERS]
|
||||
|
||||
#define MAX_CLCMDS 24
|
||||
|
||||
@ -138,7 +138,7 @@ public actionBanMenu(id, key)
|
||||
}
|
||||
new player = g_menuPlayers[id][g_menuPosition[id] * 7 + key]
|
||||
|
||||
new name[32], name2[32], authid[32], authid2[32]
|
||||
new name[MAX_NAME_LENGTH], name2[MAX_NAME_LENGTH], authid[32], authid2[32]
|
||||
get_user_name(player, name2, 31)
|
||||
get_user_authid(id, authid, 31)
|
||||
get_user_authid(player, authid2, 31)
|
||||
@ -215,7 +215,7 @@ displayBanMenu(id, pos)
|
||||
new menuBody[512]
|
||||
new b = 0
|
||||
new i
|
||||
new name[32]
|
||||
new name[MAX_NAME_LENGTH]
|
||||
new start = pos * 7
|
||||
|
||||
if (start >= g_menuPlayersNum[id])
|
||||
@ -298,7 +298,7 @@ public actionSlapMenu(id,key) {
|
||||
default: {
|
||||
new player = g_menuPlayers[id][g_menuPosition[id] * 7 + key]
|
||||
|
||||
new name2[32]
|
||||
new name2[MAX_NAME_LENGTH]
|
||||
get_user_name(player,name2,31)
|
||||
|
||||
if (!is_user_alive(player)) {
|
||||
@ -307,7 +307,7 @@ public actionSlapMenu(id,key) {
|
||||
return PLUGIN_HANDLED
|
||||
}
|
||||
|
||||
new authid[32],authid2[32], name[32]
|
||||
new authid[32],authid2[32], name[MAX_NAME_LENGTH]
|
||||
|
||||
get_user_authid(id,authid,31)
|
||||
get_user_authid(player,authid2,31)
|
||||
@ -351,7 +351,7 @@ displaySlapMenu(id, pos)
|
||||
new menuBody[512]
|
||||
new b = 0
|
||||
new i
|
||||
new name[32]
|
||||
new name[MAX_NAME_LENGTH]
|
||||
new start = pos * 7
|
||||
|
||||
if (start >= g_menuPlayersNum[id])
|
||||
@ -427,7 +427,7 @@ public actionKickMenu(id,key)
|
||||
default: {
|
||||
new player = g_menuPlayers[id][g_menuPosition[id] * 8 + key]
|
||||
|
||||
new authid[32],authid2[32], name[32], name2[32]
|
||||
new authid[32],authid2[32], name[MAX_NAME_LENGTH], name2[MAX_NAME_LENGTH]
|
||||
get_user_authid(id,authid,31)
|
||||
get_user_authid(player,authid2,31)
|
||||
get_user_name(id,name,31)
|
||||
@ -461,7 +461,7 @@ displayKickMenu(id, pos)
|
||||
new menuBody[512]
|
||||
new b = 0
|
||||
new i
|
||||
new name[32]
|
||||
new name[MAX_NAME_LENGTH]
|
||||
new start = pos * 8
|
||||
|
||||
if (start >= g_menuPlayersNum[id])
|
||||
@ -530,7 +530,7 @@ public actionTeamMenu(id,key) {
|
||||
case 9: displayTeamMenu(id,--g_menuPosition[id])
|
||||
default: {
|
||||
new player = g_menuPlayers[id][g_menuPosition[id] * 7 + key]
|
||||
new authid[32],authid2[32], name[32], name2[32]
|
||||
new authid[32],authid2[32], name[MAX_NAME_LENGTH], name2[MAX_NAME_LENGTH]
|
||||
get_user_name(player,name2,31)
|
||||
get_user_authid(id,authid,31)
|
||||
get_user_authid(player,authid2,31)
|
||||
@ -570,7 +570,7 @@ displayTeamMenu(id, pos)
|
||||
new menuBody[512]
|
||||
new b = 0
|
||||
new i, iteam
|
||||
new name[32]
|
||||
new name[MAX_NAME_LENGTH]
|
||||
new start = pos * 7
|
||||
|
||||
if (start >= g_menuPlayersNum[id])
|
||||
@ -647,7 +647,7 @@ public actionClcmdMenu(id,key) {
|
||||
new player = g_menuPlayers[id][g_menuPosition[id] * 7 + key]
|
||||
new flags = g_clcmdMisc[g_menuSelect[id][g_menuOption[id]]][1]
|
||||
if (is_user_connected(player)) {
|
||||
new command[64], authid[32], name[32], userid[32]
|
||||
new command[64], authid[32], name[MAX_NAME_LENGTH], userid[32]
|
||||
copy(command,63,g_clcmdCmd[g_menuSelect[id][g_menuOption[id]]])
|
||||
get_user_authid(player,authid,31)
|
||||
get_user_name(player,name,31)
|
||||
@ -680,7 +680,7 @@ displayClcmdMenu(id, pos)
|
||||
new menuBody[512]
|
||||
new b = 0
|
||||
new i
|
||||
new name[32]
|
||||
new name[MAX_NAME_LENGTH]
|
||||
new start = pos * 7
|
||||
|
||||
if (start >= g_menuPlayersNum[id])
|
||||
|
@ -47,20 +47,20 @@ public DoubleKill
|
||||
public DoubleKillSound
|
||||
public BulletDamage
|
||||
|
||||
new g_streakKills[33][2]
|
||||
new g_multiKills[33][2]
|
||||
new g_streakKills[MAX_PLAYERS][2]
|
||||
new g_multiKills[MAX_PLAYERS][2]
|
||||
new Float:g_prevKill
|
||||
new g_prevKillerId
|
||||
new g_KillCount;
|
||||
|
||||
new g_userPosition[33]
|
||||
new g_userState[33]
|
||||
new g_userPlayers[33][32]
|
||||
new g_userPosition[MAX_PLAYERS]
|
||||
new g_userState[MAX_PLAYERS]
|
||||
new g_userPlayers[MAX_PLAYERS][MAX_PLAYERS]
|
||||
new g_Buffer[2048]
|
||||
|
||||
|
||||
new g_Killers[33][4]
|
||||
new Float:g_DeathStats[33]
|
||||
new g_Killers[MAX_PLAYERS][4]
|
||||
new Float:g_DeathStats[MAX_PLAYERS]
|
||||
|
||||
new g_center1_sync
|
||||
new g_center2_sync
|
||||
@ -240,7 +240,7 @@ public cmdRank(id){
|
||||
}
|
||||
|
||||
displayRank(id,dest) {
|
||||
new name[32], stats[8], body[8]
|
||||
new name[MAX_NAME_LENGTH], stats[8], body[8]
|
||||
new rank_pos = get_user_stats(id,stats,body)
|
||||
new pos = format(g_Buffer,2047,"Kills: %d^nDeaths: %d^nTKs: %d^nDamage: %d^nHits: %d^nShots: %d^n^n",
|
||||
stats[0],stats[1],stats[3],stats[6],stats[5],stats[4])
|
||||
@ -264,7 +264,7 @@ public cmdTop15(id) {
|
||||
|
||||
/* get top 15 */
|
||||
getTop15(){
|
||||
new stats[8], body[8], name[32]
|
||||
new stats[8], body[8], name[MAX_NAME_LENGTH]
|
||||
new pos = copy(g_Buffer,2047,"# nick kills/deaths TKs hits/shots/headshots^n")
|
||||
new imax = get_statsnum()
|
||||
if (imax > 15) imax = 15
|
||||
@ -278,14 +278,14 @@ getTop15(){
|
||||
|
||||
public endGameStats(){
|
||||
if ( EndPlayer ){
|
||||
new players[32], inum
|
||||
new players[MAX_PLAYERS], inum
|
||||
get_players(players,inum)
|
||||
for(new i = 0; i < inum; ++i){
|
||||
displayStats(players[i],players[i])
|
||||
}
|
||||
}
|
||||
else if ( EndTop15 ){
|
||||
new players[32], inum
|
||||
new players[MAX_PLAYERS], inum
|
||||
get_players(players,inum)
|
||||
getTop15()
|
||||
for(new i = 0; i < inum; ++i)
|
||||
@ -310,10 +310,9 @@ public cmdStats(id){
|
||||
|
||||
/* build list of attackers */
|
||||
getAttackers(id) {
|
||||
new name[32],wpn[32], stats[8],body[8],found=0
|
||||
new name[MAX_NAME_LENGTH],wpn[32], stats[8],body[8],found=0
|
||||
new pos = copy(g_Buffer,2047,"Attackers:^n")
|
||||
new amax = get_maxplayers()
|
||||
for(new a = 1; a <= amax; ++a){
|
||||
for(new a = 1; a <= MaxClients; ++a){
|
||||
|
||||
if(get_user_astats(id,a,stats,body,wpn,31)){
|
||||
found = 1
|
||||
@ -331,10 +330,9 @@ getAttackers(id) {
|
||||
|
||||
/* build list of victims */
|
||||
getVictims(id) {
|
||||
new name[32],wpn[32], stats[8],body[8],found=0
|
||||
new name[MAX_NAME_LENGTH],wpn[32], stats[8],body[8],found=0
|
||||
new pos = copy(g_Buffer,2047,"Victims:^n")
|
||||
new amax = get_maxplayers()
|
||||
for(new a = 1; a <= amax; ++a){
|
||||
for(new a = 1; a <= MaxClients; ++a){
|
||||
if(get_user_vstats(id,a,stats,body,wpn,31)){
|
||||
found = 1
|
||||
if (stats[1])
|
||||
@ -361,7 +359,7 @@ getHits(id,killer) {
|
||||
|
||||
/* build list of hits for say hp */
|
||||
getMyHits(id,killed) {
|
||||
new name[32], stats[8], body[8], found = 0
|
||||
new name[MAX_NAME_LENGTH], stats[8], body[8], found = 0
|
||||
get_user_name(killed,name,31)
|
||||
new pos = format(g_Buffer,2047,"You hit %s in:",name)
|
||||
get_user_vstats(id,killed,stats,body)
|
||||
@ -384,7 +382,7 @@ public cmdKiller(id) {
|
||||
return PLUGIN_HANDLED
|
||||
}
|
||||
if (g_Killers[id][0]) {
|
||||
new name[32], stats[8], body[8], wpn[33], mstats[8], mbody[8]
|
||||
new name[MAX_NAME_LENGTH], stats[8], body[8], wpn[33], mstats[8], mbody[8]
|
||||
get_user_name(g_Killers[id][0],name,31)
|
||||
get_user_astats(id,g_Killers[id][0],stats,body,wpn,31)
|
||||
client_print(id,print_chat,"%s killed you with %s from distance of %.2f meters", name,wpn,float(g_Killers[id][3]) * 0.0254 )
|
||||
@ -436,7 +434,7 @@ showStatsMenu(id,pos){
|
||||
if (start >= inum) start = pos = g_userPosition[id] = 0
|
||||
|
||||
new len = format(menu_body,511,"Server Stats %d/%d^n^n",pos + 1,((inum/max_menupos)+((inum%max_menupos)?1:0)))
|
||||
new name[32], end = start + max_menupos, keys = (1<<9)|(1<<7)
|
||||
new name[MAX_NAME_LENGTH], end = start + max_menupos, keys = (1<<9)|(1<<7)
|
||||
if (end > inum) end = inum
|
||||
for(new a = start; a < end; ++a){
|
||||
get_user_name(g_userPlayers[id][a],name,31)
|
||||
@ -474,7 +472,7 @@ public client_damage(attacker,victim,damage,wpnindex,hitplace,TA){
|
||||
|
||||
/* save state at death */
|
||||
public client_death(killer,victim,wpnindex,hitplace,TK){
|
||||
new killer_name[32]
|
||||
new killer_name[MAX_NAME_LENGTH]
|
||||
get_user_name(killer,killer_name,31)
|
||||
|
||||
if ( KillingStreak || KillingStreakSound ){
|
||||
@ -486,7 +484,7 @@ public client_death(killer,victim,wpnindex,hitplace,TK){
|
||||
new headshot = ( hitplace == HIT_HEAD ) ? 1:0
|
||||
new selfKill = ( killer == victim ) ? 1:0
|
||||
|
||||
new victim_name[32]
|
||||
new victim_name[MAX_NAME_LENGTH]
|
||||
get_user_name(victim,victim_name,31)
|
||||
|
||||
new Float:statstime = get_cvar_float("tfcstats_statstime")
|
||||
@ -548,7 +546,7 @@ public client_death(killer,victim,wpnindex,hitplace,TK){
|
||||
if ( (a >>= 1) > 6 ) a = 6
|
||||
if ( KillingStreak ){
|
||||
set_hudmessage(0, 100, 255, 0.05, 0.55, 2, 0.02, 6.0, 0.01, 0.1, -1)
|
||||
for (new i=1;i<=get_maxplayers();i++){
|
||||
for (new i=1;i<=MaxClients;i++){
|
||||
if ( g_Killers[i][0] && g_DeathStats[i] > get_gametime() )
|
||||
continue
|
||||
ShowSyncHudMsg(i, g_left_sync, g_KillingMsg[ a ], killer_name)
|
||||
@ -572,7 +570,7 @@ public client_death(killer,victim,wpnindex,hitplace,TK){
|
||||
if ( xmod_is_melee_wpn(wpnindex) && ( KnifeKill || KnifeKillSound ) ){
|
||||
if ( KnifeKill ){
|
||||
set_hudmessage(255, 100, 100, -1.0, 0.15, 1, 6.0, 6.0, 0.5, 0.15, -1)
|
||||
for (new i=1;i<=get_maxplayers();i++){
|
||||
for (new i=1;i<=MaxClients;i++){
|
||||
if ( g_Killers[i][0] && g_DeathStats[i] > get_gametime() )
|
||||
|
||||
continue
|
||||
@ -584,7 +582,7 @@ public client_death(killer,victim,wpnindex,hitplace,TK){
|
||||
else if ( grenade ){
|
||||
if ( GrenadeKill ){
|
||||
set_hudmessage(255, 100, 100, -1.0, 0.15, 1, 6.0, 6.0, 0.5, 0.15, -1)
|
||||
for (new i=1;i<=get_maxplayers();i++){
|
||||
for (new i=1;i<=MaxClients;i++){
|
||||
if ( g_Killers[i][0] && g_DeathStats[i] > get_gametime() )
|
||||
continue
|
||||
ShowSyncHudMsg(i, g_center1_sync, g_HeMessages[ random_num(0,3)],killer_name,victim_name)
|
||||
@ -601,7 +599,7 @@ public client_death(killer,victim,wpnindex,hitplace,TK){
|
||||
replace( message, sizeof(message)-1, "$wn", weapon )
|
||||
replace( message, sizeof(message)-1, "$kn", killer_name )
|
||||
set_hudmessage(100, 100, 255, -1.0, 0.19, 0, 6.0, 6.0, 0.5, 0.15, -1)
|
||||
for (new i=1;i<=get_maxplayers();i++){
|
||||
for (new i=1;i<=MaxClients;i++){
|
||||
if ( g_Killers[i][0] && g_DeathStats[i] > get_gametime() )
|
||||
continue
|
||||
ShowSyncHudMsg(i, g_center2_sync, "%s", message)
|
||||
@ -635,7 +633,7 @@ public showDoubleKill(){
|
||||
return PLUGIN_CONTINUE
|
||||
|
||||
if ( DoubleKill ) {
|
||||
new name[32],message[128]
|
||||
new name[MAX_NAME_LENGTH],message[128]
|
||||
get_user_name(g_prevKillerId,name,31)
|
||||
copy( message, 127, g_DoubleKillMsg[pos] )
|
||||
replace( message, 127 , "$kn", name )
|
||||
@ -645,7 +643,7 @@ public showDoubleKill(){
|
||||
replace( message, 127 , "$kk", kills )
|
||||
}
|
||||
set_hudmessage(65, 102, 158, -1.0, 0.25, 0, 6.0, 6.0, 0.5, 0.15, -1)
|
||||
for (new i=1;i<=get_maxplayers();i++){
|
||||
for (new i=1;i<=MaxClients;i++){
|
||||
if ( g_Killers[i][0] && g_DeathStats[i] > get_gametime() )
|
||||
continue
|
||||
show_hudmessage(i, "%s", message)
|
||||
@ -664,11 +662,11 @@ public checkKills(param[]){
|
||||
a -= 3
|
||||
if ( a > -1 ){
|
||||
if ( MultiKill ) {
|
||||
new name[32]
|
||||
new name[MAX_NAME_LENGTH]
|
||||
get_user_name(id,name,31)
|
||||
set_hudmessage(255, 0, 100, 0.05, 0.65, 2, 0.02, 6.0, 0.01, 0.1, -1)
|
||||
if ( a > 6 ) a = 6
|
||||
for (new i=1;i<=get_maxplayers();i++){
|
||||
for (new i=1;i<=MaxClients;i++){
|
||||
if ( g_Killers[i][0] && g_DeathStats[i] > get_gametime() )
|
||||
continue
|
||||
ShowSyncHudMsg(i, g_left_sync, g_MultiKillMsg[a],name,g_multiKills[id][0],g_multiKills[id][1])
|
||||
|
@ -35,8 +35,8 @@
|
||||
#include <amxmodx>
|
||||
#include <tfcx>
|
||||
|
||||
new g_pingSum[33]
|
||||
new g_pingCount[33]
|
||||
new g_pingSum[MAX_PLAYERS]
|
||||
new g_pingCount[MAX_PLAYERS]
|
||||
|
||||
public plugin_init()
|
||||
register_plugin("TFC Stats Logging",AMXX_VERSION_STR,"AMXX Dev Team")
|
||||
@ -44,7 +44,7 @@ public plugin_init()
|
||||
public client_disconnect(id) {
|
||||
if ( is_user_bot( id ) ) return PLUGIN_CONTINUE
|
||||
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 )
|
||||
get_user_team(id, szTeam, 15 )
|
||||
get_user_name(id, szName ,31 )
|
||||
|
@ -266,7 +266,7 @@ public timeRemain(param[])
|
||||
|
||||
if (flags & TD_BOTTOM_WHITE_TEXT)
|
||||
{
|
||||
new players[32], pnum, plr
|
||||
new players[MAX_PLAYERS], pnum, plr
|
||||
|
||||
get_players(players, pnum, "c")
|
||||
|
||||
|
@ -49,12 +49,12 @@ public BulletDamage
|
||||
public TAInfo
|
||||
public FragInfo
|
||||
|
||||
new g_userPosition[33]
|
||||
new g_userState[33]
|
||||
new g_userPlayers[33][32]
|
||||
new g_userPosition[MAX_PLAYERS]
|
||||
new g_userState[MAX_PLAYERS]
|
||||
new g_userPlayers[MAX_PLAYERS][MAX_PLAYERS]
|
||||
new g_Buffer[2048]
|
||||
new g_Killers[33][3]
|
||||
new Float:g_DeathStats[33]
|
||||
new g_Killers[MAX_PLAYERS][3]
|
||||
new Float:g_DeathStats[MAX_PLAYERS]
|
||||
|
||||
new g_center1_sync
|
||||
new g_damage_sync
|
||||
@ -209,7 +209,7 @@ public cmdTop15(id) {
|
||||
|
||||
/* get top 15 */
|
||||
getTop15(){
|
||||
new stats[8], body[8], name[32]
|
||||
new stats[8], body[8], name[MAX_NAME_LENGTH]
|
||||
new pos = copy(g_Buffer,2047,"# nick kills/deaths TKs hits/shots/headshots^n")
|
||||
new imax = get_statsnum()
|
||||
if (imax > 15) imax = 15
|
||||
@ -223,13 +223,13 @@ getTop15(){
|
||||
|
||||
public endGameStats(){
|
||||
if ( EndPlayer ){
|
||||
new players[32], inum
|
||||
new players[MAX_PLAYERS], inum
|
||||
get_players(players,inum)
|
||||
for(new i = 0; i < inum; ++i)
|
||||
displayStats(players[i],players[i])
|
||||
}
|
||||
else if ( EndTop15 ) {
|
||||
new players[32], inum
|
||||
new players[MAX_PLAYERS], inum
|
||||
get_players(players,inum)
|
||||
getTop15()
|
||||
for(new i = 0; i < inum; ++i)
|
||||
@ -252,10 +252,9 @@ public cmdStats(id){
|
||||
|
||||
/* build list of attackers */
|
||||
getAttackers(id) {
|
||||
new name[32],wpn[32], stats[8],body[8],found=0
|
||||
new name[MAX_NAME_LENGTH],wpn[32], stats[8],body[8],found=0
|
||||
new pos = copy(g_Buffer,2047,"Attackers:^n")
|
||||
new amax = get_maxplayers()
|
||||
for(new a = 1; a <= amax; ++a){
|
||||
for(new a = 1; a <= MaxClients; ++a){
|
||||
if(get_user_astats(id,a,stats,body,wpn,31)){
|
||||
found = 1
|
||||
if (stats[0])
|
||||
@ -271,10 +270,9 @@ getAttackers(id) {
|
||||
|
||||
/* build list of victims */
|
||||
getVictims(id) {
|
||||
new name[32],wpn[32], stats[8],body[8],found=0
|
||||
new name[MAX_NAME_LENGTH],wpn[32], stats[8],body[8],found=0
|
||||
new pos = copy(g_Buffer,2047,"Victims:^n")
|
||||
new amax = get_maxplayers()
|
||||
for(new a = 1; a <= amax; ++a){
|
||||
for(new a = 1; a <= MaxClients; ++a){
|
||||
if(get_user_vstats(id,a,stats,body,wpn,31)){
|
||||
found = 1
|
||||
if (stats[1])
|
||||
@ -301,7 +299,7 @@ getHits(id,killer) {
|
||||
|
||||
/* build list of hits for say hp */
|
||||
getMyHits(id,killed) {
|
||||
new name[32], stats[8], body[8], found = 0
|
||||
new name[MAX_NAME_LENGTH], stats[8], body[8], found = 0
|
||||
get_user_name(killed,name,31)
|
||||
new pos = format(g_Buffer,2047,"You hit %s in:",name)
|
||||
get_user_vstats(id,killed,stats,body)
|
||||
@ -317,7 +315,7 @@ getMyHits(id,killed) {
|
||||
public client_damage(attacker,victim,damage,wpnindex,hitplace,TA) {
|
||||
if ( TA ){
|
||||
if ( TAInfo && is_user_alive(victim) ){
|
||||
new attacker_name[32]
|
||||
new attacker_name[MAX_NAME_LENGTH]
|
||||
get_user_name(attacker,attacker_name,31)
|
||||
client_print(0,print_chat,"%s attacked a teammate",attacker_name)
|
||||
}
|
||||
@ -334,7 +332,7 @@ public client_damage(attacker,victim,damage,wpnindex,hitplace,TA) {
|
||||
}
|
||||
|
||||
public client_death(killer,victim,wpnindex,hitplace,TK){
|
||||
new killer_name[32]
|
||||
new killer_name[MAX_NAME_LENGTH]
|
||||
get_user_name(killer,killer_name,31)
|
||||
|
||||
if ( TK ){
|
||||
@ -348,7 +346,7 @@ public client_death(killer,victim,wpnindex,hitplace,TK){
|
||||
new grenade = ( wpnindex == TSW_M61GRENADE ) ? 1:0
|
||||
new headshot = ( hitplace == HIT_HEAD ) ? 1:0
|
||||
|
||||
new victim_name[32]
|
||||
new victim_name[MAX_NAME_LENGTH]
|
||||
get_user_name(victim,victim_name,31)
|
||||
|
||||
if ( killer == victim ){
|
||||
@ -375,7 +373,7 @@ public client_death(killer,victim,wpnindex,hitplace,TK){
|
||||
|
||||
if ( grenade && GrenadeKill ){
|
||||
set_hudmessage(255, 100, 100, -1.0, 0.25, 1, 6.0, 6.0, 0.5, 0.15, -1)
|
||||
for (new i=1;i<=get_maxplayers();i++){
|
||||
for (new i=1;i<=MaxClients;i++){
|
||||
if ( g_Killers[i][0] && g_DeathStats[i] > get_gametime() )
|
||||
continue
|
||||
show_hudmessage(i, g_HeMessages[ random_num(0,3)],killer_name,victim_name)
|
||||
@ -390,7 +388,7 @@ public client_death(killer,victim,wpnindex,hitplace,TK){
|
||||
replace( message, sizeof(message)-1 , "$wn", weapon )
|
||||
replace( message, sizeof(message)-1, "$kn", killer_name )
|
||||
set_hudmessage(100, 100, 255, -1.0, 0.29, 0, 6.0, 6.0, 0.5, 0.15, -1)
|
||||
for (new i=1;i<=get_maxplayers();i++){
|
||||
for (new i=1;i<=MaxClients;i++){
|
||||
if ( g_Killers[i][0] && g_DeathStats[i] > get_gametime() )
|
||||
continue
|
||||
ShowSyncHudMsg(i, g_center1_sync, "%s", message)
|
||||
@ -402,7 +400,7 @@ public client_death(killer,victim,wpnindex,hitplace,TK){
|
||||
if ( killFlags & TSKF_DOUBLEKILL ){
|
||||
if ( DoubleKill ){
|
||||
set_hudmessage(65, 102, 158, -1.0, 0.35, 0, 6.0, 6.0, 0.5, 0.15, -1)
|
||||
for (new i=1;i<=get_maxplayers();i++){
|
||||
for (new i=1;i<=MaxClients;i++){
|
||||
if ( g_Killers[i][0] && g_DeathStats[i] > get_gametime() )
|
||||
continue
|
||||
show_hudmessage(i,"Wow! %s made a double kill !!!",killer_name)
|
||||
@ -444,7 +442,7 @@ public client_death(killer,victim,wpnindex,hitplace,TK){
|
||||
|
||||
DisplayKillInfo(victim){
|
||||
if ( ShowKiller ){
|
||||
new name[32], stats[8], body[8], wpn[33], mstats[8], mbody[8]
|
||||
new name[MAX_NAME_LENGTH], stats[8], body[8], wpn[33], mstats[8], mbody[8]
|
||||
get_user_name(g_Killers[victim][0],name,31)
|
||||
get_user_astats(victim,g_Killers[victim][0],stats,body,wpn,31)
|
||||
get_user_vstats(victim,g_Killers[victim][0],mstats,mbody)
|
||||
@ -469,7 +467,7 @@ DisplayAVList(victim){
|
||||
|
||||
DisplayKillerHp(victim,con){
|
||||
if ( KillerHp ){
|
||||
new name[32], kmsg[128]
|
||||
new name[MAX_NAME_LENGTH], kmsg[128]
|
||||
get_user_name(g_Killers[victim][0],name,31)
|
||||
format(kmsg,127,"%s still has %dhp",name,g_Killers[victim][1])
|
||||
if ( con ) client_print(victim,print_console, "%s", kmsg)
|
||||
@ -497,7 +495,7 @@ public cmdKiller(id) {
|
||||
return PLUGIN_HANDLED
|
||||
}
|
||||
if (g_Killers[id][0]) {
|
||||
new name[32], stats[8], body[8], wpn[33], mstats[8], mbody[8]
|
||||
new name[MAX_NAME_LENGTH], stats[8], body[8], wpn[33], mstats[8], mbody[8]
|
||||
get_user_name(g_Killers[id][0],name,31)
|
||||
get_user_astats(id,g_Killers[id][0],stats,body,wpn,31)
|
||||
get_user_vstats(id,g_Killers[id][0],mstats,mbody)
|
||||
@ -542,7 +540,7 @@ showStatsMenu(id,pos){
|
||||
get_players(g_userPlayers[id],inum)
|
||||
if (start >= inum) start = pos = g_userPosition[id] = 0
|
||||
new len = format(menu_body,511,"Server Stats %d/%d^n^n",pos + 1,((inum/MAX_MENUPOS)+((inum%MAX_MENUPOS)?1:0)))
|
||||
new name[32], end = start + MAX_MENUPOS, keys = (1<<9)|(1<<7)
|
||||
new name[MAX_NAME_LENGTH], end = start + MAX_MENUPOS, keys = (1<<9)|(1<<7)
|
||||
if (end > inum) end = inum
|
||||
for(new a = start; a < end; ++a){
|
||||
get_user_name(g_userPlayers[id][a],name,31)
|
||||
|
@ -10,8 +10,8 @@
|
||||
#include <tsx>
|
||||
#include <tsfun>
|
||||
|
||||
new g_pingSum[33]
|
||||
new g_pingCount[33]
|
||||
new g_pingSum[MAX_PLAYERS]
|
||||
new g_pingCount[MAX_PLAYERS]
|
||||
|
||||
public plugin_init()
|
||||
register_plugin("Stats Logging",AMXX_VERSION_STR,"AMXX Dev Team")
|
||||
@ -19,7 +19,7 @@ public plugin_init()
|
||||
public client_disconnect(id) {
|
||||
if ( is_user_bot( id ) ) return PLUGIN_CONTINUE
|
||||
remove_task( id )
|
||||
new szTeam[16],szName[32],szAuthid[32], iStats[8], iHits[8], szWeapon[16]
|
||||
new szTeam[16],szName[MAX_NAME_LENGTH],szAuthid[32], iStats[8], iHits[8], szWeapon[16]
|
||||
new iUserid = get_user_userid( id )
|
||||
|
||||
// team
|
||||
|
Loading…
Reference in New Issue
Block a user