Raised This Month: $51 Target: $400
 12% 

Subplugin Submission [ZP] Extra Item ( Buy 1000HP ) Updated


Post New Thread Reply   
 
Thread Tools Display Modes
C.Ronaldo
Senior Member
Join Date: Dec 2014
Old 08-24-2015 , 20:32   Re: [ZP] Extra Item ( Buy 1000HP ) Updated
Reply With Quote #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()
}
}
C.Ronaldo is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 08-25-2015 , 15:51   Re: [ZP] Extra Item ( Buy 1000HP ) Updated
Reply With Quote #52

Code:
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)
If you can't figure it out... i have no words...
Depresie is offline
RainePlayz1
Junior Member
Join Date: Mar 2022
Old 08-12-2022 , 04:27   Re: [ZP] Extra Item ( Buy 1000HP ) Updated
Reply With Quote #53

Not Working I tested this
RainePlayz1 is offline
Aboveboat
Junior Member
Join Date: Dec 2023
Location: Florida
Old 12-07-2023 , 22:57   Re: [ZP] Extra Item ( Buy 1000HP ) Updated
Reply With Quote #54

Its works as suppose to but can someone edit it to put a buy limit on it ? cause i only want people to be able to buy it 2 times. also for people that don't it to show up for humans just delete the ZP Human line. Also complie it locally.

Last edited by Aboveboat; 12-07-2023 at 22:58.
Aboveboat is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:05.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode