基礎SMA教學 PART-4 如何運用代數

Home Home
<< 1 2 >>
跳頁: (共 2 頁)
引用 | 編輯 lilaihung8
2015-08-06 18:46
30樓
* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <fun>
new math

public plugin_init()
{
     register_plugin("test2", "5.5", "keith")
     register_clcmd("say /giveme", "giveme")
     register_logevent("roundstart",2, "1=Round_Start")
}

public giveme(id)
{
     if(math == 1)
     {
            client_print(id, print_chat, "[AMXX]有人拿過m4了!")
     }
     else
     {
     give_item(id, "weapon_m4a1")
     math++
     strip_user_weapons(id)
      }
}

public roundstart()
{
     math = 0
}

我打好了但是在遊戲用沒反應 成功轉amxx 用amx_studio打

獻花 x0
引用 | 編輯 sam27201
2015-08-16 18:55
31樓
  
學習一下

獻花 x0
引用 | 編輯 wqaz123
2015-08-21 09:39
32樓
  
謝大大分享

希望威望足夠可以看到這篇文章 謝謝

獻花 x0
引用 | 編輯 a23107971a
2016-05-07 13:55
33樓
  
錯綜有點複雜了
不過至少知道怎運用

獻花 x0
引用 | 編輯 as2648as
2016-05-18 23:01
34樓
  
看到5樓我的理解能力都快炸了@@
如果是以範例來看的話是指因為初始的math=0
所以在第一次跑的時候他會執行else
也就是獲得武器 然後把math改為1
由於這時的math已經是1了
所以再度輸入指令只會有顯示文字的功能xD

在最後roundstart的時候
把所有人的math在設定回0

是這樣嗎@w@?

獻花 x0
引用 | 編輯 丘俊
2016-11-24 20:45
35樓
  
嗯...

獻花 x0
引用 | 編輯 丘俊
2016-11-24 20:48
36樓
  
不得不说,虽然我已经会写些插件了,但是回头看看LZ的教程,还是有些东西漏掉了...

獻花 x0
<< 1 2 >>
跳頁: (共 2 頁)