找回密碼
 註冊
[日本手機遊戲APPS下載] 手機遊戲專區 熱門短片

型男索女 
查看: 3564|回復: 0

請高手回答. 係amxx問題

  [複製鏈接]
發表於 14-8-2009 14:02:33 | 顯示全部樓層 |閱讀模式
本帖最後由 123465798 於 14-8-2009 14:04 編輯

#include <amxmodx>
#define PLUGIN "Auto Restart"
#define VERSION "1.5"
#define AUTHOR "~K!d~"
#define MAX_PLAYERS 32
new aika, restarted, frztime
new bool:resonce
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("HLTV", "event_new_round", "a", "1=0", "2=0")
register_event("TextMsg", "event_game_commencing", "a", "2=#Game_Commencing")
register_cvar("autorestart_interval","1")
}
public event_game_commencing() {
if(!resonce) {
  frztime = get_cvar_num("mp_freezetime")
  server_cmd("mp_freezetime %d",get_cvar_num("autorestart_interval")+8)  // 凍結時間
}
}
public event_new_round() {
if(restarted == 0 && get_playersnum() > 1 && !resonce) {
  resonce = true
  StartCounting()
} else if(restarted == 3) {
  restarted = 0
} else if(restarted == 2) {
  restarted = 3
  server_cmd("mp_freezetime %d",frztime)
  server_cmd("sv_restartround 8")  // 第三次重啟倒數秒
} else if(restarted == 1) {
  restarted = 2
  server_cmd("sv_restartround 8")  // 第二次重啟倒數秒
}
}
public StartCounting() {
aika = get_cvar_num("autorestart_interval")
PrintCenter()
}
public PrintCenter() {
aika = aika-1
if(aika == 0 ) {
  client_print(0,print_center,"遊戲將重新開始",aika)
  StartRestart()
  return PLUGIN_HANDLED
}
client_print(0,print_center,"遊戲將重啟於 %d 秒後",aika)
set_task(1.0, "PrintCenter", 0)
return PLUGIN_CONTINUE
}
public StartRestart() {
restarted = 1
server_cmd("sv_restartround 8")  // 第一次重啟倒數秒
}




請問點先改反為re3次?我次次都係甘re係甘re.吾該高手回答
如果方便的話sd個amxx檔比我.  fung-_-v@hotmail.com.

autorestart.sma

1.53 KB, 下載次數: 1231

回復

使用道具 舉報

您需要登錄後才可以回帖 登錄 | 註冊

本版積分規則

小黑屋|Archiver|手機版|Nakuz.com |網站地圖

GMT+8, 6-5-2025 11:31 , Processed in 0.046831 second(s), 15 queries , MemCache On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回復 返回頂部 返回列表