|
发表于 2007-6-30 03:46:48
|
显示全部楼层
来自 中国–福建–漳州
回复: Rulzy老大还得麻烦你了,谢谢。
- #include <amxmodx>
- public plugin_init(){
- register_plugin( "restart", "1.0", "yyy")
- ........
- }
- public client_disconnect(id)
- {
- if (task_exists(34343443)) return PLUGIN_CONTINUE;
- new count=0;
- new maxplayers=get_maxplayers();
- for(new i=1;i<=maxplayers;i++)
- {
- if(is_user_connecting(i)) count++;
- }
- if(count>=8)
- {
- set_hudmessage(0, 200, 0, -1.0, 0.40, 0, 6.0, 6.0, 0.1, 0.1, 1)
- show_hudmessage(0,"restart")
- set_task(5.0, "rround", 34343443)
- }
- return PLUGIN_CONTINUE
- }
- public rround()
- {
- server_cmd("sv_restartround 1")
- }
复制代码 |
|