我自己写的插件有问题

Home Home
引用 | 編輯 ad406998554
2012-05-03 17:53
樓主
推文 x0
今天我自己用ACG写了一个"人类或僵尸胜利时显示人类或僵尸胜利的SPR",插件能编译得出但是我放进游戏里后没有效果(就像没添加这个插件一样),求各位大大帮忙看看哪里写错了,具体教我改一改

控制台显示:
L 05/03/2012 - 17:32:10: [ACG] Player out of range (0)
L 05/03/2012 - 17:32:10: [AMXX] Run time error 10 (plugin "win.amxx") (native "acg_drawsprdefined") - debug not enabled!
L 05/03/2012 - 17:32:10: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).


插件源码:
#include <amxmodx>
#include <zombieplague>
#include <acg>
#define PLUGIN "Roundended"
#define VERSION "1.0"
#define AUTHOR "ad406998554"
public zp_round_ended(winteam)
{
 if(winteam != WIN_ZOMBIES)
 {
  winteam = WIN_HUMANS
                acg_drawsprdefined(0, "win_human", 255, 255, 255, 0.5, 0.3,
   1,FX_FADE, 1.0, 2.0, 0, 2.0, DRAW_ADDITIVE, -1)
 }
 else
 {
                acg_drawsprdefined(0, "win_zombie", 255, 255, 255, 0.5, 0.3,
   1,FX_FADE, 1.0, 2.0, 0, 2.0, DRAW_ADDITIVE, -1)
 }
}

本帖包含附件
檔名: txt acg.txt   (2022-06-09 14:19 / 14 KB)  
ACG模块
下載次數:5


獻花 x0
引用 | 編輯 andyt0621
2012-05-03 18:07
1樓
  
應該是native不可能用0作id..
自己改為for的迴轉吧

獻花 x0
引用 | 編輯 ad406998554
2012-05-03 19:15
2樓
  
下面是引用 andyt0621 于 2012-05-03 18:07 发表的 : 到引言文 应该是native不可能用0作id..自己改为for的回转吧
大大能具体教教我吗?我学插件的时间没有多久,还有很多不懂的...

獻花 x0
引用 | 編輯 HiNess
2012-05-03 19:45
3樓
  
複製程式
for (new id=1; id<=get_maxplayers(); id++)
{
       if (!is_user_connected(id)) continue
       
       acg_drawsprdefined(id, "win_human", 255, 255, 255, 0.5, 0.3, 1,FX_FADE, 1.0, 2.0, 0, 2.0, DRAW_ADDITIVE, -1)
}


獻花 x0
引用 | 編輯 ad406998554
2012-05-03 21:05
4樓
  
下面是引用 HiNess 于 2012-05-03 19:45 发表的 : 到引言文 複製程式
for (new id=1; id<=get_maxplayers(); id++){       if (!is_user_connected(id)) continue              acg_drawsprdefined(id, "win_human", 255, 255, 255, 0.5, 0.3, 1,FX_FADE, 1.0, 2.0, 0, 2.0, DRAW_ADDITIVE, -1)}
我知道了,谢谢两位大大指点

獻花 x0