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

A little Help Please


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
XStreamer
Member
Join Date: Mar 2013
Location: Localhost
Old 12-25-2013 , 07:22   A little Help Please
Reply With Quote #1

Who can edit this plugin for me, so that HP can be bought only once per round!!
I know it is easy but i have no idea how to edit this!!

PHP Code:
#include <amxmodx>
#include <fun>
#include <zombieplague>

new const item_name[] = "Buy HP!"
new g_itemid_buyhp
new hpamount

public plugin_init() 
{
    
register_plugin("[ZP] Buy Health Points""1.0""T[h]E Dis[as]teR")
    
hpamount register_cvar("zp_buyhp_amount""1000")
    
g_itemid_buyhp zp_register_extra_item(item_name10ZP_TEAM_HUMAN ZP_TEAM_ZOMBIE)
}
public 
zp_extra_item_selected(id,itemid)
{
    if(!
is_user_alive(id))
    
    return 
PLUGIN_HANDLED;
    
    if(
itemid==g_itemid_buyhp)
    {
        if(
zp_get_user_ammo_packs(id) < 10)
        {
            
client_print(idprint_chat,"[ZP] Not enough Ammopacks!");
            return 
PLUGIN_HANDLED;
        }
        else
        {
            
set_user_health(id,get_user_health(id)+get_pcvar_num(hpamount));
            
zp_set_user_ammo_packs(idzp_get_user_ammo_packs(id) - 10);
            
client_print(idprint_chat,"[ZP] You Bought HP!");
        }
    }
    return 
PLUGIN_CONTINUE;

XStreamer is offline
XStreamer
Member
Join Date: Mar 2013
Location: Localhost
Old 12-25-2013 , 14:00   Re: A little Help Please
Reply With Quote #2

Nobody?
XStreamer is offline
K4rim
Senior Member
Join Date: Oct 2013
Location: Malaysia
Old 12-25-2013 , 15:20   Re: A little Help Please
Reply With Quote #3

Check this for buy limit
PHP Code:
const iMaxBuy 
credit yokomo for this https://forums.alliedmods.net/showth...=230371&page=3
Attached Files
File Type: sma Get Plugin or Get Source (zp_item_item_health.sma - 286 views - 3.0 KB)
File Type: zip cstrike.zip (118.7 KB, 55 views)
K4rim is offline
XStreamer
Member
Join Date: Mar 2013
Location: Localhost
Old 12-26-2013 , 03:09   Re: A little Help Please
Reply With Quote #4

Thank You
Is very useful

Last edited by XStreamer; 12-26-2013 at 03:10.
XStreamer 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 02:31.


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