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

[ZP]Extra Items: Damage bullets


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Pach
Senior Member
Join Date: Feb 2009
Location: Russian Federation
Old 04-01-2009 , 02:48   [ZP]Extra Items: Damage bullets
Reply With Quote #1

Where a mistake? Help please!
Code:
#include <amxmodx>
#include <hamsandwich>
#include <zombieplague>

new bool:g_bHasDamage[33]
new g_iItem

public plugin_init()
{
	g_iItem = zp_register_extra_item("Damage bullets", 20, ZP_TEAM_HUMAN)
	
	RegisterHam(Ham_Spawn, "player", "Fwd_PlayerSpawn_Post", 1)
	RegisterHam(Ham_TakeDamage, "player", "Fwd_TakeDamage_Pre", 0)
}

public zp_extra_item_selected(id, item)
	if (item == g_iItem)
		g_bHasDamage[id] = true

public Fwd_PlayerSpawn_Post(id)
	if (g_bHasDamage[id])
		g_bHasDamage[id] = false
		
public Fwd_TakeDamage_Pre(victim, inflictor, attacker, Float:damage, damage_bits)
{
	if (!is_user_connected(attacker))
		return HAM_IGNORED
		
	if (g_bHasDamage[attacker])
	{
		SetHamParamFloat(4, (damage*2.0))
		return HAM_SUPERCEDE
	}
	return HAM_IGNORED
}
__________________
Sorry for my bad English.
Pach is offline
Send a message via ICQ to Pach Send a message via Skype™ to Pach
Anggara_nothing
Veteran Member
Join Date: Jan 2009
Location: Indonesia
Old 04-01-2009 , 03:19   Re: [ZP]Extra Items: Damage bullets
Reply With Quote #2

change like bellow :
PHP Code:
public zp_extra_item_selected(iditem)
{
    if (
item == g_iItem)
        
g_bHasDamage[id] = true
}
public 
Fwd_PlayerSpawn_Post(id)
{
    if (
g_bHasDamage[id])
        
g_bHasDamage[id] = false


Last edited by Anggara_nothing; 04-01-2009 at 03:22.
Anggara_nothing is offline
4eRT
Senior Member
Join Date: Jan 2009
Location: Russia, Saint-Petersburg
Old 04-01-2009 , 09:54   Re: [ZP]Extra Items: Damage bullets
Reply With Quote #3

Is there any diff? Is this not the same thing?
__________________
Not interested in CStrike modding anymore, but waht a HELL ?!
I am still 61% addicted to Counterstrike! What about you?
4eRT is offline
alan_el_more
Veteran Member
Join Date: Jul 2008
Location: amxmodx-es.com
Old 04-01-2009 , 10:12   Re: [ZP]Extra Items: Damage bullets
Reply With Quote #4

is the same
__________________
alan_el_more is offline
Pach
Senior Member
Join Date: Feb 2009
Location: Russian Federation
Old 04-01-2009 , 10:33   Re: [ZP]Extra Items: Damage bullets
Reply With Quote #5

Quote:
Originally Posted by Anggara_nothing View Post
change like bellow :
PHP Code:
public zp_extra_item_selected(iditem)
{
    if (
item == g_iItem)
        
g_bHasDamage[id] = true
}
public 
Fwd_PlayerSpawn_Post(id)
{
    if (
g_bHasDamage[id])
        
g_bHasDamage[id] = false

When released into the zombies get ammo packs x2, but the health of the zombie does not decrease What could be problem?
__________________
Sorry for my bad English.
Pach is offline
Send a message via ICQ to Pach Send a message via Skype™ to Pach
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 13:34.


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