|
Senior Member
|
08-24-2015
, 20:32
Re: [ZP] Extra Item ( Buy 1000HP ) Updated
|
#51
|
can some one help me here for this plugin, i need it to give zombie 5000 hp
Quote:
#include <amxmodx>
#include <fakemeta>
#define ZP_TEAM_ZOMBIE (1<<0)
native zp_register_extra_item(a[], b, c)
forward zp_extra_item_selected(a, b)
new BUY_HP_ITEM_ID, HP_CVAR_AMMOUNT
public plugin_init()
{
register_plugin("[ZP] Buy Health", "1.0", "Hattrick")
HP_CVAR_AMMOUNT = register_cvar("zp_buy_hp_amount", "2500")
BUY_HP_ITEM_ID = zp_register_extra_item("Buy HP 2500!", 25, ZP_TEAM_ZOMBIE)
}
public zp_extra_item_selected(index, item)
{
if (item == BUY_HP_ITEM_ID)
{
new Float:HP = float(get_user_health(index)) + get_pcvar_float(HP_CVAR_AMMOUNT)
set_pev(index, pev_health, HP)
new x[128]
formatex(x, charsmax(x), "^x04[ZP]^x03 You Bought^x01 HP 2500!", get_pcvar_float(HP_CVAR_AMMOUNT))
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, index)
write_byte(index)
write_string(x)
message_end()
}
}
|
|
|
|
|