急~谁能教我做sma档?

Home Home
引用 | 编辑 家亨
2011-02-21 19:55
楼主
推文 x0
谁能教我做SMA档

我只需要一些基本的指令和稍微进阶的指令

献花 x0
引用 | 编辑 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