搜索
查看: 2605|回复: 1

jim_yang大哥不在,哪位大哥会看代码的帮忙一下谢谢

[复制链接]
发表于 2008-6-29 22:44:09 | 显示全部楼层 |阅读模式 来自 中国–广西–柳州–柳北区
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fakemeta>
#include <memhack>
public plugin_init()
{
register_plugin("Slots Reservation","1.0","Lu0007")
register_cvar("amx_reservation","1")
#if defined HIDE_RESERVEDSLOTS
set_cvar_num( "sv_visiblemaxplayers" , get_maxplayers() - 1 )
#endif
}
//玩家进入初始化
public client_authorized(id) {
new name[33]
get_name(id,name,32) //返回玩家名
new maxplayers = get_maxplayers() //返回游戏最大人数
new players = get_playersnum( 1 ) //统计人数 ,连正在连接的也算
new limit = maxplayers - get_cvar_num("amx_reservation") //服最大人数 减去预留人数
//当超过限制人数时
if ( players > limit )
{
//进入的VIP&&OP 或是内网地址如192.168 或是有内网IP段的如 10.0
if ( get_user_flags(id) & ADMIN_RESERVATION)
{
new szname[32],ping,loss,worst=-1
set_user_flags(id, get_user_flags(id)|ADMIN_IMMUNITY)
//set_user_flags(id,read_flags("b"))
//设置玩家标记,b 为可通过预留通道加入服务器
for(new i = 1; i <= maxplayers; ++i) {
if ( !is_user_connected(i) && !is_user_connecting(i) )
continue // not used slot
if (get_user_flags(i)&ADMIN_RESERVATION)
continue // has reservation, skip him
new CsTeams:userTeam = cs_get_user_team(i)
if ( userTeam == CS_TEAM_SPECTATOR ) {
server_cmd("kick #%d [提示] 服满VIP进入踢观察者!请稍后再进入.", get_user_userid(i) )
} else
get_user_name(i,szname,31)
if (contain(szname, "[NO-sXe-I]") != -1){
server_cmd("kick #%d [提示] 服满VIP进服踢无SXE!请安装SXE再进.", get_user_userid(i) )
}
}
}
else { //是人的,提示并踢除
server_cmd("kick #%d 提示:VIP预留通道!请稍后再进。", get_user_userid(id) )
}
return PLUGIN_HANDLED
}
return PLUGIN_CONTINUE
}
出现
L 06/29/2008 - 14:15:42: [CSTRIKE] Invalid player 8
L 06/29/2008 - 14:15:42: [AMXX] Displaying debug trace (plugin "slots_reservation_CN_Lu0007.amxx")
L 06/29/2008 - 14:15:42: [AMXX] Run time error 10: native error (native "cs_get_user_team")
L 06/29/2008 - 14:15:42: [AMXX] [0] slots_reservation_CN_Lu0007.sma::client_authorized (line 41)
L 06/29/2008 - 14:47:34: Start of error session.
L 06/29/2008 - 14:47:34: Info (map "de_inferno") (logfile "error_062908.log")
L 06/29/2008 - 14:47:34: [CSTRIKE] Invalid player 28
L 06/29/2008 - 14:47:34: [AMXX] Displaying debug trace (plugin "slots_reservation_CN_Lu0007.amxx")
L 06/29/2008 - 14:47:34: [AMXX] Run time error 10: native error (native "cs_get_user_team")
L 06/29/2008 - 14:47:34: [AMXX] [0] slots_reservation_CN_Lu0007.sma::client_authorized (line 41)
L 06/29/2008 - 14:56:04: replace() buffer not big enough (129>=127)
L 06/29/2008 - 14:56:04: [AMXX] Run time error 10 (plugin "statsx.amxx") (native "replace") - debug not enabled!
L 06/29/2008 - 14:56:04: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 06/29/2008 - 14:56:10: replace() buffer not big enough (129>=127)
L 06/29/2008 - 14:56:10: [AMXX] Run time error 10 (plugin "statsx.amxx") (native "replace") - debug not enabled!
L 06/29/2008 - 14:56:10: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 06/29/2008 - 15:22:34: Start of error session.
L 06/29/2008 - 15:22:34: Info (map "828_dust3") (logfile "error_062908.log")
L 06/29/2008 - 15:22:34: [CSTRIKE] Invalid player 2
L 06/29/2008 - 15:22:34: [AMXX] Displaying debug trace (plugin "slots_reservation_CN_Lu0007.amxx")
L 06/29/2008 - 15:22:34: [AMXX] Run time error 10: native error (native "cs_get_user_team")
L 06/29/2008 - 15:22:34: [AMXX] [0] slots_reservation_CN_Lu0007.sma::client_authorized (line 41)
L 06/29/2008 - 16:27:48: Start of error session.
L 06/29/2008 - 16:27:48: Info (map "de_nuke") (logfile "error_062908.log")
L 06/29/2008 - 16:27:48: [CSTRIKE] Invalid player 12
L 06/29/2008 - 16:27:48: [AMXX] Displaying debug trace (plugin "slots_reservation_CN_Lu0007.amxx")
L 06/29/2008 - 16:27:48: [AMXX] Run time error 10: native error (native "cs_get_user_team")
L 06/29/2008 - 16:27:48: [AMXX] [0] slots_reservation_CN_Lu0007.sma::client_authorized (line 41)
L 06/29/2008 - 17:47:18: Start of error session.
L 06/29/2008 - 17:47:18: Info (map "de_aztec") (logfile "error_062908.log")
L 06/29/2008 - 17:47:18: [CSTRIKE] Invalid player 28
L 06/29/2008 - 17:47:18: [AMXX] Displaying debug trace (plugin "slots_reservation_CN_Lu0007.amxx")
L 06/29/2008 - 17:47:18: [AMXX] Run time error 10: native error (native "cs_get_user_team")
L 06/29/2008 - 17:47:18: [AMXX] [0] slots_reservation_CN_Lu0007.sma::client_authorized (line 41)
L 06/29/2008 - 19:35:04: Start of error session.
L 06/29/2008 - 19:35:04: Info (map "de_dust2") (logfile "error_062908.log")
L 06/29/2008 - 19:35:04: [CSTRIKE] Invalid player 15
L 06/29/2008 - 19:35:04: [AMXX] Displaying debug trace (plugin "slots_reservation_CN_Lu0007.amxx")
L 06/29/2008 - 19:35:04: [AMXX] Run time error 10: native error (native "cs_get_user_team")
L 06/29/2008 - 19:35:04: [AMXX] [0] slots_reservation_CN_Lu0007.sma::client_authorized (line 41)
请问是什么原因?谢谢。
 楼主| 发表于 2008-7-1 02:38:13 | 显示全部楼层 来自 中国–广西–柳州–柳北区

回复: jim_yang大哥请问这个怎么改?

:confused: ,弄得挂服两次了,大哥哪去了?
回复

使用道具 举报

游客
回复
您需要登录后才可以回帖 登录 | 注个册吧

快速回复 返回顶部 返回列表