引用 | 編輯
85607417
2011-02-21 20:56 |
1樓
▲ ▼ |
#include <amxmodx>
public plugin_init( ) { register_plugin( "Example", "1.0", "author" ); register_clcmd( "say /test", "test" ); } public test() { client_print(id, print_chat, "Test 測試"); } x0 |
引用 | 編輯
tw2twtw
2011-02-21 22:29 |
2樓
▲ |
指令的話就這3個教學文....((不過ZP的比較麻煩.....
http://bbs.mychat.to/reads.php?tid=832252 http://bbs.mychat.to/reads.php?tid=828620 http://bbs.mychat.to/reads.php?tid=846982 寫法的話((如樓上 //註冊插件的內容 public plugin_init( ) { register_plugin( "插件名稱", "版本", "作者" ) register_clcmd( "add_hp", "addhp") //前者為指令,後者為所執行的public , } public addhp(id) { if(!is_user_alive(id)) //如果id沒有活著, ! 是否定的意思 { client_print(id,print_chat,"你死了無法使用") } else { set_user_health(id,get_user_health(id) +300) //設定玩家的血為(id,得到玩家的血量(id) +300) client_print(id,print_chat,"你得到了300的血量") } } x0 |