搜索
楼主: heroxianf

[AMXX 带源码] 求CS1.6无限弹夹插件

[复制链接]
 楼主| 发表于 2010-7-3 16:30:23 | 显示全部楼层 来自 四川成都
还是不行  可能要从新写一下
回复

使用道具 举报

发表于 2010-7-3 16:33:55 | 显示全部楼层 来自 广东广州
11# heroxianf


if( ammo <= 1)

这个条件不要吧
回复

使用道具 举报

发表于 2010-7-3 16:37:07 | 显示全部楼层 来自 广东广州
或者用if(cs_get_user_bpammo(id,weaponi)<254)代替
回复

使用道具 举报

 楼主| 发表于 2010-7-3 16:37:39 | 显示全部楼层 来自 四川成都
12# rsdtt


还是不行  可能整个都要从来 毕竟这个不是为备用弹夹写的  而且到现在我还没见过 有单独的插件可以实现备用弹夹无限
回复

使用道具 举报

发表于 2010-7-3 16:49:54 | 显示全部楼层 来自 广东广州
#include <amxmodx>
#include <amxmisc>
#include <cstrike>

#define PLUGIN ""
#define VERSION ""
#define AUTHOR ""

new unlammo;

public plugin_init() {
        register_plugin(PLUGIN, VERSION, AUTHOR);
        
        register_event("CurWeapon", "event_weapon", "be");
        
        unlammo = register_cvar("amx_unlammo","1");
}

public event_weapon(id) {
        
        if( get_pcvar_num(unlammo) < 1){
                return PLUGIN_HANDLED
        }
        
        if(cstrike_running())
        {
                new clip, ammo
                new weapon = get_user_weapon(id,clip,ammo);
                if(cs_get_user_bpammo(id,weapon)<254)
                       cs_set_user_bpammo(id,weapon,254)
        }
        return 0;
}
回复

使用道具 举报

发表于 2010-7-3 16:50:22 | 显示全部楼层 来自 广东广州
不就这么简单,有那么复杂吗?
回复

使用道具 举报

 楼主| 发表于 2010-7-3 19:02:33 | 显示全部楼层 来自 四川成都
16# rsdtt


不会 所以就这么难    谢谢 我先收着 回去再试试
回复

使用道具 举报

发表于 2010-7-3 22:24:38 | 显示全部楼层 来自 广东惠州
15# rsdtt
CurWeapon事件触发太频繁,还是少用为妙。

  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <cstrike>
  4. #include <hamsandwich>

  5. #define PLUGIN_NAME        "New Plug-In"
  6. #define PLUGIN_VERSION        "0.1"
  7. #define PLUGIN_AUTHOR        "zwfgdlc"

  8. new const AMMOTYPE[][] =
  9. {
  10.         "",
  11.         "338magnum",
  12.         "762nato",
  13.         "556natobox",
  14.         "556nato",
  15.         "buckshot",
  16.         "45acp",
  17.         "57mm",
  18.         "50ae",
  19.         "357sig",
  20.         "9mm"      
  21. };

  22. public plugin_init()
  23. {
  24.         register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);
  25.         register_event("AmmoX", "event_AmmoX", "be", "1>0","2>0");
  26. }

  27. public event_AmmoX(id)
  28. {
  29.         if (read_data(1) < 11)       
  30.         ExecuteHamB(Ham_GiveAmmo, id, 255, AMMOTYPE[read_data(1)], 255);
  31. }
复制代码
回复

使用道具 举报

发表于 2010-7-4 12:11:42 | 显示全部楼层 来自 甘肃兰州
zwfgdlc大大的很简练,学习了~
回复

使用道具 举报

 楼主| 发表于 2010-7-4 13:37:26 | 显示全部楼层 来自 四川成都
18# zwfgdlc


有没有什么教程之类的  想学习下
回复

使用道具 举报

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

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