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

How to set +100 energy when one zp extra item be purchased


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
WaLkMaN
Senior Member
Join Date: Oct 2010
Location: Varna, Bulgaria
Old 01-17-2012 , 12:01   How to set +100 energy when one zp extra item be purchased
Reply With Quote #1

Hello. I need some help to create one plugin. This is in my code:

public zp_extra_item_selected(player, itemid)
{
new Float:energy
energy = get_pcvar_float(pcv_nn_energy)

if (itemid == g_itemid_energyboost)
{

}
}
I want to add when the item be purchased to set +100 in this cvar pcv_nn_energy because in the main plugin is 100 energy and i want to give + 100 (and total the energy to be 200)

Do you understand me?
WaLkMaN is offline
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 01-17-2012 , 12:53   Re: How to set +100 energy when one zp extra item be purchased
Reply With Quote #2

Why you all copyng a lan server zombie plague?
.Dare Devil. is offline
Old 01-20-2015, 15:04
A4tech990616
This message has been deleted by A4tech990616.
A4tech990616
New Member
Join Date: Jan 2015
Old 01-20-2015 , 17:50   Re: How to set +100 energy when one zp extra item be purchased
Reply With Quote #3

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <zombieplague>


#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"

new const g_item_name[] = { "Energy Boost" }
new g_item_cost = 40
new g_itemid
new pcv_nn_energy
new g_itemid_energyboost

public plugin_init() {
register_plugin("[ZP] Extra: Energy Boost", "1.0", "Devil")

g_itemid = zp_register_extra_item(g_item_name, g_item_cost, ZP_TEAM_HUMAN)
}
public zp_extra_item_selected(player, itemid)
{
new float:energy
energy = get_pcvar_float(pcv_nn_energy)
if(itemid = g_itemid_energyboost)

I do not know on how to continue
A4tech990616 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 19:41.


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