|
楼主 |
发表于 2010-7-3 15:41:49
|
显示全部楼层
来自 中国–四川
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <engine>
#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);
new weaponname[32]
get_weaponname(weapon,weaponname,31)
new weaponi = find_ent_by_owner(-1,weaponname,id);
if(weaponi)
{
new ammo = cs_get_weapon_ammo(weaponi);
if( ammo <= 1)
cs_set_weapon_ammo(weaponi,ammo + 253);
}
}
return 0;
}
这事我使用无限子弹的插件 斑竹看看怎么修改 |
|