搜索
楼主: 114772348

求大虾帮改个报钱插件!

[复制链接]
 楼主| 发表于 2010-5-29 14:01:28 | 显示全部楼层 来自 四川泸州
大哥,能介绍下怎么编译成SMA文件吗?我搞了半天 compile 不给我编译成AMXX。不知道杂回事
回复

使用道具 举报

 楼主| 发表于 2010-5-29 14:39:15 | 显示全部楼层 来自 四川泸州
我编译成了SMA怎么转换不成AMXX呀,不会是代码有错吧?

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注个册吧

×
回复

使用道具 举报

 楼主| 发表于 2010-5-29 14:53:57 | 显示全部楼层 来自 四川泸州
:'( 有人帮我下吗?做成AMXX,急死人了
回复

使用道具 举报

发表于 2010-5-29 18:11:40 | 显示全部楼层 来自 广东广州
本帖最后由 kk阿朗 于 2010-5-29 18:33 编辑

我的编译器是只支持英文的!所以中文的没办法!
  1. #include <amxmodx>
  2. #include <cstrike>
  3. #include <hamsandwich>

  4. #define NAME "show teammate's money"
  5. #define VERSION "1.3.1"
  6. #define AUTHOR "K.K.Lv"

  7. new g_max_players, g_sync_creat_statustext, g_sync_creat_list

  8. new bool:g_teammate[33]

  9. new cvar_plugin_on
  10. new cvar_status_on

  11. public plugin_init()
  12. {
  13.         register_plugin(NAME, VERSION, AUTHOR)
  14.        
  15.         register_dictionary("stm.txt")
  16.         RegisterHam(Ham_Spawn, "player", "player_spawn", 1)
  17.        
  18.         register_clcmd("say /money", "clcmd_money")
  19.        
  20.         register_event("StatusValue", "show_teammate_money", "be", "1=2", "2!0")
  21.         register_event("StatusValue", "set_team", "be", "1=1")
  22.        
  23.         cvar_plugin_on = register_cvar("stm_on", "1")
  24.         cvar_status_on = register_cvar("stm_st_on", "1")
  25.        
  26.         g_max_players = get_maxplayers()
  27.         g_sync_creat_statustext = CreateHudSyncObj()
  28.         g_sync_creat_list = CreateHudSyncObj()
  29. }

  30. public clcmd_money(client)
  31. {
  32.         if (!get_pcvar_num(cvar_plugin_on))
  33.         {
  34.                 client_print(client, print_chat, "%L", client, "PLUGIN_UNABLE")
  35.                 return PLUGIN_HANDLED
  36.         }
  37.         show_money(client)
  38.         return PLUGIN_CONTINUE
  39. }

  40. public player_spawn(client)
  41. {
  42.         remove_task(client)
  43.         if (is_user_alive(client) && get_pcvar_num(cvar_plugin_on))
  44.         {
  45.                 set_task(1.0, "show_money", client)
  46.         }
  47. }

  48. public show_money(client)
  49. {
  50.         static message[1024];
  51.         static name[32];
  52.        
  53.         new money, id, len;
  54.        
  55.         len = format(message, charsmax(message), "%L", client, "TITLE");
  56.         for (id = 1; id <= g_max_players; id++)
  57.         {
  58.                 if (id != client && is_user_connected(id) && cs_get_user_team(id) == cs_get_user_team(client))
  59.                 {
  60.                         money = cs_get_user_money(id);
  61.                         get_user_name(id, name, 31);
  62.                         len += format(message[len], charsmax(message) - len, "%L", client, "BODY", name, money);
  63.                 }
  64.         }
  65.         set_hudmessage(100, 200, 0, 0.05, 0.35, 0, 0.02, 5.0, 0.1, 0.2, 2);
  66.         ShowSyncHudMsg(client, g_sync_creat_list, message);
  67. }

  68. public set_team(id)
  69.         g_teammate[id] = bool:(read_data(2) == 1);

  70. public show_teammate_money(id)
  71. {
  72.         if (!get_pcvar_num(cvar_plugin_on))
  73.                 return PLUGIN_HANDLED;
  74.         if(!is_user_bot(id) && is_user_connected(id) && get_pcvar_num(cvar_status_on))
  75.         {
  76.                 static name[32];
  77.                
  78.                 new pid = read_data(2);
  79.                 new red = 0, blue = 0;
  80.                
  81.                 if (cs_get_user_team(pid) == CS_TEAM_T)
  82.                         red = 255;
  83.                 else if(cs_get_user_team(pid) == CS_TEAM_CT)
  84.                         blue = 255;
  85.                
  86.                 get_user_name(pid, name, charsmax(name));
  87.                 new money = cs_get_user_money(pid);
  88.                 if (g_teammate[id])
  89.                 {
  90.                         set_hudmessage(red, 50, blue, -1.0, 0.60, 1, 0.01, 0.6, 0.01, 0.01, 8);
  91.                         ShowSyncHudMsg(id, g_sync_creat_statustext, "%L", id, "TEAMMATE", name, money);
  92.                 }
  93.                 else {
  94.                         set_hudmessage(red, 50, blue, -1.0, 0.60, 1, 0.01, 0.6, 0.01, 0.01, 8);
  95.                         ShowSyncHudMsg(id, g_sync_creat_statustext, "%L", id, "ENEMY", name);
  96.                 }
  97.         }
  98.         return PLUGIN_CONTINUE;
  99. }

  100. public client_disconnect(client)
  101. {
  102.         remove_task(client);
  103. }
复制代码
把stm.txt文件放在"$MOD\addons\amxmodx\data\lang"文件下

edit:没测试过!!

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注个册吧

×
回复

使用道具 举报

 楼主| 发表于 2010-5-29 18:43:58 | 显示全部楼层 来自 四川泸州
本帖最后由 114772348 于 2010-5-29 18:53 编辑

朋友插件你有试过吗?怎么没反应呢?
回复

使用道具 举报

发表于 2010-8-11 15:46:57 | 显示全部楼层 来自 北京
2 楼 还是好人多啊!
回复

使用道具 举报

游客
回复
您需要登录后才可以回帖 登录 | 注个册吧

快速回复 返回顶部 返回列表