|
发表于 2008-5-21 18:23:22
|
显示全部楼层
来自 中国–福建–漳州
回复: 求助,如果做个只能查ip的插件
- #include <amxmodx>
- #include <amxmisc>
- public plugin_init()
- {
- register_plugin("Show IP", "1.0", "Rulzy");
-
- register_concmd("amx_ip", "cmdIp", ADMIN_BAN, "- show users' ip");
- }
- public cmdIp(id, level, cid)
- {
- if(cmd_access(id, level, cid, 1))
- {
- new ip[20], name[32]
- new maxplayers = get_maxplayers();
- for(new i=1;i<=maxplayers;i++)
- {
- if(is_user_connected(i)||is_user_connecting(i))
- {
- get_user_ip(i, ip, 19, 1);
- get_user_name(i, name, 31);
- console_print(id, "%32s %s", name, ip);
- }
- }
- }
- return PLUGIN_HANDLED
- }
复制代码 |
|