|
发表于 2007-3-1 08:35:51
|
显示全部楼层
来自 中国–福建–龙岩
回复: 代修改adminslots插件?
你没注意这个么?当ADMIN通道满了就Drop玩家。
在此之前,你可以设置服务器执行sv_password设置。
:D
- public client_authorized(id)
- #else
- public client_connect(id)
- #endif
- {
- new maxplayers = get_maxplayers( )
- new players = get_playersnum( 1 )
- new limit = maxplayers - get_cvar_num( "amx_reservation" )
-
- if ( (get_user_flags(id) & ADMIN_RESERVATION) || (players <= limit) )
- {
- #if defined HIDE_RESERVED_SLOTS
- setVisibleSlots( players , maxplayers, limit )
- #endif
- return PLUGIN_CONTINUE
- }
- #if !defined NO_STEAM
- client_cmd(id,_T("echo ^"Dropped due to slot reservation^";%s") , g_cmdLoopback)
- #else
- if ( is_user_bot(id) )
- server_cmd("kick #%d", get_user_userid(id) )
- else
- client_cmd(id,_T("echo ^"Dropped due to slot reservation^";disconnect"))
- #endif
-
- return PLUGIN_HANDLED
- }
复制代码 |
|