Raised This Month: $ Target: $400
 0% 

Don't know how to fix errors


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
zwfgdlc
Senior Member
Join Date: May 2006
Old 01-13-2009 , 08:29   Re: Don't know how to fix errors
Reply With Quote #1

try this.not tested.
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 on_off new price public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     on_off = register_cvar("zp_buyhp", "1")     price = register_cvar("zp_buyhp_price", "5")     if((g_itemid_buyhp = zp_register_extra_item("item name", get_pcvar_num(price), ZP_TEAM_HUMAN)) == -1     ||!get_pcvar_num(on_off))     pause("ad"); } 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) < get_pcvar_num(price))         {             client_print(id, print_chat,"[ZP] Not enough Ammopacks!");             return PLUGIN_HANDLED;         }else{             set_user_health(id,1000);             zp_set_user_ammo_packs(id,zp_get_user_ammo_packs(id)-get_pcvar_num(price));             client_print(id, print_chat,"[ZP] You Gained 1000HP!");         }     }     return PLUGIN_CONTINUE; }

Last edited by zwfgdlc; 01-13-2009 at 08:39.
zwfgdlc 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 01:39.


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