|
现在使用的plmenu插件可以投票,但是封不到人,看了下说的是检查authid为4294967295 OR VALVE_ID_LAN OR HLTV, 才改为封玩家IP,用OP封了以后,得到结果ID: STEAM_0:0:0,有没有办法让插件检查uniqueid,如果值是VALVE_0:0:0,就改为封玩家IP,我建的服务器所有玩家的uniqueid是VALVE_0:0:0,或者不检查能直接投票封IP也好,附代码
public actionBanMenu(id, key)
{
switch (key)
{
case 7:
{
/* BEGIN OF CHANGES BY MISTAGEE ADDED A FEW MORE OPTIONS */
++g_menuOption[id]
g_menuOption[id] %= ArraySize(g_bantimes);
g_menuSettings[id] = ArrayGetCell(g_bantimes, g_menuOption[id]);
displayBanMenu(id, g_menuPosition[id])
}
case 8: displayBanMenu(id, ++g_menuPosition[id])
case 9: displayBanMenu(id, --g_menuPosition[id])
default:
{
new player = g_menuPlayers[id][g_menuPosition[id] * 7 + key]
new name[32], name2[32], authid[32], authid2[32]
get_user_name(player, name2, 31)
get_user_authid(id, authid, 31)
get_user_authid(player, authid2, 31)
get_user_name(id, name, 31)
new userid2 = get_user_userid(player)
log_amx("Ban: ^"%s<%d><%s><>^" ban and kick ^"%s<%d><%s><>^" (minutes ^"%d^")", name, get_user_userid(id), authid, name2, userid2, authid2, g_menuSettings[id])
if (g_menuSettings[id]==0) // permanent
{
new maxpl = get_maxplayers();
for (new i = 1; i <= maxpl; i++)
{
show_activity_id(i, id, name, "%L %s %L", i, "BAN", name2, i, "PERM");
}
}
else
{
new tempTime[32];
formatex(tempTime,sizeof(tempTime)-1,"%d",g_menuSettings[id]);
new maxpl = get_maxplayers();
for (new i = 1; i <= maxpl; i++)
{
show_activity_id(i, id, name, "%L %s %L", i, "BAN", name2, i, "FOR_MIN", tempTime);
}
}
/* ---------- check for Steam ID added by MistaGee --------------------
IF AUTHID == 4294967295 OR VALVE_ID_LAN OR HLTV, BAN PER IP TO NOT BAN EVERYONE */
if (equal("4294967295", authid2)
|| equal("HLTV", authid2)
|| equal("STEAM_ID_LAN", authid2)
|| equali("VALVE_ID_LAN", authid2))
{
/* END OF MODIFICATIONS BY MISTAGEE */
new ipa[32]
get_user_ip(player, ipa, 31, 1)
server_cmd("addip %d %s;writeip", g_menuSettings[id], ipa)
}
else
{
server_cmd("banid %d #%d kick;writeid", g_menuSettings[id], userid2)
}
server_exec()
displayBanMenu(id, g_menuPosition[id])
|
|