heroxianf
发表于 2010-7-3 16:30:23
还是不行可能要从新写一下
rsdtt
发表于 2010-7-3 16:33:55
11# heroxianf
if( ammo <= 1)
这个条件不要吧
rsdtt
发表于 2010-7-3 16:37:07
或者用if(cs_get_user_bpammo(id,weaponi)<254)代替
heroxianf
发表于 2010-7-3 16:37:39
12# rsdtt
还是不行可能整个都要从来 毕竟这个不是为备用弹夹写的而且到现在我还没见过 有单独的插件可以实现备用弹夹无限
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;
}
rsdtt
发表于 2010-7-3 16:50:22
不就这么简单,有那么复杂吗?
heroxianf
发表于 2010-7-3 19:02:33
16# rsdtt
不会 所以就这么难 谢谢 我先收着 回去再试试
zwfgdlc
发表于 2010-7-3 22:24:38
15# rsdtt
CurWeapon事件触发太频繁,还是少用为妙。
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <hamsandwich>
#define PLUGIN_NAME "New Plug-In"
#define PLUGIN_VERSION "0.1"
#define PLUGIN_AUTHOR "zwfgdlc"
new const AMMOTYPE[][] =
{
"",
"338magnum",
"762nato",
"556natobox",
"556nato",
"buckshot",
"45acp",
"57mm",
"50ae",
"357sig",
"9mm"
};
public plugin_init()
{
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);
register_event("AmmoX", "event_AmmoX", "be", "1>0","2>0");
}
public event_AmmoX(id)
{
if (read_data(1) < 11)
ExecuteHamB(Ham_GiveAmmo, id, 255, AMMOTYPE, 255);
}
yesterday
发表于 2010-7-4 12:11:42
zwfgdlc大大的很简练,学习了~
heroxianf
发表于 2010-7-4 13:37:26
18# zwfgdlc
有没有什么教程之类的想学习下