Raised This Month: $ Target: $400
 0% 

How to use take_damage? (russ?)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
fafik91
Junior Member
Join Date: Dec 2008
Old 12-29-2008 , 22:06   How to use take_damage? (russ?)
Reply With Quote #1

May anyone know how to use take_damage function?
Может кто знает как использовать эту функцию?
fafik91 is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 12-30-2008 , 05:33   Re: How to use take_damage? (russ?)
Reply With Quote #2

There is multilangual forum if you want to use your own language.
Code:
#include <amxmodx>
#include <hamsandwich>
public plugin_init()
{
  RegisterHam(Ham_TakeDamage, "function", "player");
}
public function(this, inflictor, attacker, Float:damage, damagebits)
{
  SetHamParamFloat(4, damage * 2.0);
  return HAM_HANDLED;
}
When you set the ParamFloat you probably understand that it's a float, so remember to use desimals. There it does double damage, but for no damage it would be:
Code:
SetHamParamFloat(4, 0.0);
Ofc there is many damage events, but still ham... well, too complicated.
SnoW is offline
Send a message via MSN to SnoW
fafik91
Junior Member
Join Date: Dec 2008
Old 12-30-2008 , 07:00   Re: How to use take_damage? (russ?)
Reply With Quote #3

ok! but what about take_damage() ?
fafik91 is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 12-30-2008 , 07:13   Re: How to use take_damage? (russ?)
Reply With Quote #4

it was take_damage just with hamsandwich.
__________________
xPaw is offline
fafik91
Junior Member
Join Date: Dec 2008
Old 12-30-2008 , 07:16   Re: How to use take_damage? (russ?)
Reply With Quote #5

i have no hamsandwich... can i do it without hamsandwich?
fafik91 is offline
hzqst
Senior Member
Join Date: Jul 2008
Old 12-30-2008 , 07:56   Re: How to use take_damage? (russ?)
Reply With Quote #6

take_damage is a native
Ham_TakeDamage is a forward
.....
hzqst is offline
fafik91
Junior Member
Join Date: Dec 2008
Old 12-30-2008 , 07:57   Re: How to use take_damage? (russ?)
Reply With Quote #7

ok then. can u tell me how can i increase player damage, i've tried all variants...
fafik91 is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 12-30-2008 , 08:47   Re: How to use take_damage? (russ?)
Reply With Quote #8

Quote:
Originally Posted by SnoW View Post
Code:
  RegisterHam(Ham_TakeDamage, "function", "player");
I think it's:
Code:
  RegisterHam(Ham_TakeDamage, "player", "function");
@fafik91, just get newest AMXX and enable HamSandwich module.
__________________
hleV is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 12-30-2008 , 08:55   Re: How to use take_damage? (russ?)
Reply With Quote #9

Hmm... It seems that you are right, I have used it also like that, still it's on wiki like in my first post, there must be some mistake:
RegisterHam(Ham_TakeDamage, "player_hurt", "player");
http://wiki.amxmodx.org/HamSandwich_...28AMX_Mod_X%29
SnoW is offline
Send a message via MSN to SnoW
fafik91
Junior Member
Join Date: Dec 2008
Old 12-30-2008 , 09:15   Re: How to use take_damage? (russ?)
Reply With Quote #10

doesn't work anyway
fafik91 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 09:18.


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