Raised This Month: $ Target: $400
 0% 

Don't know how to fix errors


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
The-Disaster
Member
Join Date: Jul 2008
Old 01-13-2009 , 07:43   Don't know how to fix errors
Reply With Quote #1

This is my first plugin and i tried to make it to work with Zombie-Plague
but i couldn't

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

#define PLUGIN "Buy Health Points"
#define VERSION "1.0"
#define AUTHOR "The-Disaster"

new g_itemid_buyhp
new g_item_name
new on_off
new price


public plugin_init() 
{
    register_plugin(PLUGIN, VERSION, AUTHOR)
    register_clcmd("say /buyhp", "addhp")
    on_off = register_cvar("zp_buyhp", "1")
    price = register_cvar("zp_buyhp_price", "5")
    g_itemid_buyhp = zp_register_extra_item(g_item_name, get_pcvar_num(price), ZP_TEAM_ANY = 0)
}

public addhp(id)
{
    new price_ap = zp_get_user_ammo_packs(id)
    zp_set_user_ammo_packs(id, price_ap - get_pcvar_num(price))
    if (get_pcvar_num(on_off) == 1)
    {
        if (price_ap >= get_pcvar_num(price))
        {
             set_user_health(id, ( get_user_health(id)+1000 ))
             client_print(id, print_chat,"[ZP] You Gained 1000HP!")
        }
        else
        {
        client_print(id, print_chat,"[ZP] Not enough Ammopacks!")
        }

}
}
Could some one help me please to fix this plugin
__________________
The-Disaster is offline
 


Thread Tools
Display Modes

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 01:39.


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