zoe0718 发表于 2008-9-6 13:43:12

急,关于menu菜单封人问题

现在使用的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
   g_menuOption %= ArraySize(g_bantimes);
   g_menuSettings = ArrayGetCell(g_bantimes, g_menuOption);
   displayBanMenu(id, g_menuPosition)
}
case 8: displayBanMenu(id, ++g_menuPosition)
case 9: displayBanMenu(id, --g_menuPosition)
default:
{
   new player = g_menuPlayers * 7 + key]
   new name, name2, authid, authid2

   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)
   if (g_menuSettings==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;
    formatex(tempTime,sizeof(tempTime)-1,"%d",g_menuSettings);
    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
    get_user_ip(player, ipa, 31, 1)
   
    server_cmd("addip %d %s;writeip", g_menuSettings, ipa)
   }
   else
   {
    server_cmd("banid %d #%d kick;writeid", g_menuSettings, userid2)
   }
   server_exec()
   displayBanMenu(id, g_menuPosition)

zwfgdlc 发表于 2008-9-6 13:56:23

回复: 急,关于menu菜单封人问题


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)
||equali("STEAM_0:0:0", authid2,11))
{
/* END OF MODIFICATIONS BY MISTAGEE */
new ipa
get_user_ip(player, ipa, 31, 1)

server_cmd("addip %d %s;writeip", g_menuSettings, ipa)
}
else
{
server_cmd("banid %d #%d kick;writeid", g_menuSettings, userid2)
}
server_exec()
displayBanMenu(id, g_menuPosition)

zoe0718 发表于 2008-9-6 14:16:45

回复: 急,关于menu菜单封人问题

不行哈,按照你的改了,无法编译

zoe0718 发表于 2008-9-6 14:40:55

回复: 急,关于menu菜单封人问题

难道没人帮忙啊,伤心中啊

zwfgdlc 发表于 2008-9-6 15:01:54

回复: 急,关于menu菜单封人问题


if (equal("4294967295", authid2)
|| equal("HLTV", authid2)
|| equal("STEAM_ID_LAN", authid2)
|| equali("VALVE_ID_LAN", authid2)
||equali("STEAM_0:0:0", authid2,11))
{
/* END OF MODIFICATIONS BY MISTAGEE */
new ipa
get_user_ip(player, ipa, 31, 1)

server_cmd("addip %d %s;writeip", g_menuSettings, ipa)
}
else
{
server_cmd("banid %d #%d kick;writeid", g_menuSettings, userid2)
}
server_exec()
displayBanMenu(id, g_menuPosition)
</SPAN>

zoe0718 发表于 2008-9-6 15:14:24

回复: 急,关于menu菜单封人问题

先谢上面的兄弟,但是我是了,还是不行,没封到要封的,把别人封了,我用的amxx1.8
页: [1]
查看完整版本: 急,关于menu菜单封人问题