Hi eveyone, i want change clip ammo in m3 and xm1014
but not working my plugin :/
but not working my plugin :/
Вложения
-
372 байт Просмотры: 10
try it like this.Hi eveyone, i want change clip ammo in m3 and xm1014
but not working my plugin :/
#include <amxmodx>
#include <reapi>
public plugin_init()
{
register_plugin("asd", "1.0", "test")
RegisterHookChain(RG_CBasePlayer_Spawn, "spawn", true)
}
public spawn(id)
{
if (!is_user_alive(id)) return HC_BREAK
rg_set_user_ammo(id, WEAPON_XM1014, 12)
rg_set_user_ammo(id, WeaponIdType:WEAPON_M3, 12)
return HC_SUPERCEDE
}
чего не знал того не знал) спасибо! а ваще с этим RE херни напридумывали если чесно! вроде и норм но по сути ебень!!!!!Анатолий, return HC_BREAK >> return HC_CONTINUE,
return HC_SUPERCEDE >> return HC_CONTINUE
:/ these plugins need hamsandwich module, its possible do it only reapi?Spedra, it's done differently. See custom weapon plugins.
Why not? i want use only reapi and amxmodx at pluginsSpedra, i doubt it. Why do you pursue goal of writing a plugin only on reapi?
const WEAPON_MAX_CLIP = 12
const WEAPON_MAX_AMMO = 200
new pWeapon = rg_give_item(pPlayer, "weapon_m3", GT_REPLACE)
if (!is_nullent(pWeapon))
{
rg_set_iteminfo(pWeapon, ItemInfo_iMaxClip, WEAPON_MAX_CLIP)
rg_set_iteminfo(pWeapon, ItemInfo_iMaxAmmo1, WEAPON_MAX_AMMO)
set_member(pWeapon, m_Weapon_iClip, WEAPON_MAX_CLIP)
rg_set_user_bpammo(pPlayer, WEAPON_SCOUT, WEAPON_MAX_AMMO)
}