引用 | 編輯
Marchillus
2013-02-08 20:41 |
樓主
▼ |
||
|
引用 | 編輯
Marchillus
2013-02-08 21:48 |
2樓
▲ ▼ |
引用 | 編輯
Nailaz
2013-02-08 21:54 |
3樓
▲ ▼ |
public client_PreThink(id) <-------我們並不是在public_clcmd 而是public一個續性指令什麼過去式啊 用在這代表示持續檢測有沒有連現吧 x0 |
引用 | 編輯
G.M.I
2013-02-09 00:31 |
4樓
▲ ▼ |
我想問一下,需然我寫了多年插件
但還是搞不清楚 return PLUGIN_HANDLED 和 return PLUGIN_CONTINUE -------------------------------------------- return PLUGIN_HANDLED 是不是跟Ham式的return HAM_SUPERCEDE 一樣功能? 而 return PLUGIN_CONTINUE = 停止執行之後的語句 對嗎?? x0 |
引用 | 編輯
Marchillus
2013-02-09 11:09 |
5樓
▲ ▼ |
引用 | 編輯
Marchillus
2013-02-09 11:12 |
6樓
▲ ▼ |
下面是引用 G.M.I 於 2013-02-09 00:31 發表的 :return PLUGIN_HANDLED和return HAM_SUPERCEDE是不一樣的喔~ CONTINUE意思是繼續 return PLUGIN_CONTINUE口語化就是繼續執行插件 x0 |
引用 | 編輯
烈Gama英仙座
2013-02-13 18:20 |
8樓
▲ ▼ |
有幾個 if 就要用幾個 return PLUGIN_CONTINUE 嗎??
那我問妳2個問題: 1.如果是 if(cs_get_user_team(id) == CS_TEAM_T) { ... } return PLUGIN_CONTINUE //要加這行嗎?? 2.我試寫的插件: #include <amxmodx> #include <cstrike> #include <fun> public plugin_init() { register_plugin("boss_no_gun", "1.0", "Gama") } public client_PreThink(id) { if(cs_get_user_team(id) == CS_TEAM_T) { if(cs_get_user_hasprim(id) == 1) { strip_user_weapons(id) give_item(id, "weapon_knife") plugin_end } return PLUGIN_CONTINUE } return PLUGIN_CONTINUE } 試用完後發現拿起主武器就變成"一直" "刪除武器後給予小刀" 為啥?? 我不是有用了plugin_end 嗎?? 指點...謝謝 x0 |
引用 | 編輯
Marchillus
2013-02-13 18:58 |
9樓
▲ ▼ |
下面是引用 烈Gama英仙座 於 2013-02-13 18:20 發表的 :1.汝一定要加喔 2.第一 汝怎麼if裡面又包個if呢? 正確的寫法 #include <amxmodx> #include <cstrike> #include <fun> public plugin_init() { register_plugin("boss_no_gun", "1.0", "Gama") } public client_PreThink(id) { if(cs_get_user_team(id) == CS_TEAM_T) return PLUGIN_CONTINUE; <-----要加; if(cs_get_user_hasprim(id) == 1) { strip_user_weapons(id) give_item(id, "weapon_knife") plugin_end } return PLUGIN_CONTINUE } 問題來囉 汝有沒有發現 只要拿武器會一直被換刀 因為這個是持續偵測的! 咱目前要幫汝弄完整有點懶(剛從義大遊樂園回來 有需要發訊息給咱吧!咱要去趴一下! x0 |
引用 | 編輯
烈Gama英仙座
2013-02-13 21:57 |
10樓
▲ ▼ |
了解~
謝謝大大 話說剛從義大"回來"~~ 你是哪裡人咧?? 怪怪的?? 這樣寫怎麼變成只有CT拿刀?? 而且好像還是沒解決 附上修改後的寫法: #include <amxmodx> #include <cstrike> #include <fun> public plugin_init() { register_plugin("boss_no_gun", "1.0", "Gama") } public client_PreThink(id) { if(cs_get_user_team(id) == CS_TEAM_T) return PLUGIN_CONTINUE if(cs_get_user_hasprim(id) == 1) { strip_user_weapons(id) give_item(id, "weapon_knife") plugin_end } return PLUGIN_CONTINUE } x0 |
引用 | 編輯
Marchillus
2013-02-14 10:49 |
11樓
▲ ▼ |
下面是引用 烈Gama英仙座 於 2013-02-13 21:57 發表的 :這我就不知道了 CT只有拿刀那就是指令的地方打錯 你可以用代數來限制他丟武器的次數^^ 例如 new stripweapon register_logevent("roundstart",2, "1=Round_Start") public roundstart() { stripweapon[id] = 0 } 然後再丟武器那邊加上 stripweapon ++ 再放個 if(stripweapon = 1) plugin_end return PLUGIN_HANDLED x1 |
引用 | 編輯
Marchillus
2013-02-14 21:02 |
12樓
▲ ▼ |
引用 | 編輯
Marchillus
2013-02-14 21:13 |
13樓
▲ ▼ |
引用 | 編輯
Marchillus
2013-02-24 13:18 |
14樓
▲ ▼ |
引用 | 編輯
hk1005559
2013-07-03 22:34 |
17樓
▲ ▼ |
我不會用client_PreThink的
我會用FM_PlayerPreThink的 用client_PreThink會比較LAG(個人意見) x0 |
引用 | 編輯
Marchillus
2013-12-30 22:22 |
21樓
▲ ▼ |
引用 | 編輯
j12412211202
2014-05-11 10:01 |
22樓
▲ ▼ |
因為大大的教學。令我學會了如何製作sma
x0 |
引用 | 編輯
(1)超強CT
2014-07-15 09:54 |
26樓
▲ ▼ |
#include <amxmodx>
#include <fun> #include <cstrike> public plugin_init() { register_plugin("自動持續插件", "1.0", "kill") } public clinet_PreTnink(id) { if(!is_user_connected(id)) return PLUGIN_CONTINUE; if(get_user_deaths(id) == 7) { client_print(id, print_chat, "你已經連續死了7次,加油點吧") plugin_end } return PLUGIN_CONTINUE } 我這是哪裡錯誤呢 我開遊戲都沒成功 x0 |
引用 | 編輯
Marchillus
2014-07-15 10:45 |
27樓
▲ ▼ |
下面是引用 (1)超強CT 於 2014-07-15 09:54 發表的 Re:by 嫯P.V.W狼 2/9修正,|基礎SMA教學 PART-2 持續執行: 其實 這樣的功能並不適合這樣編寫 必須用Ham_Killed再加上一個變數來判斷牠的死亡次數 x0 |