Raised This Month: $ Target: $400
 0% 

Help: esf1.2.3 plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Sting-lRl-
Junior Member
Join Date: Feb 2009
Old 02-04-2010 , 11:24   Help: esf1.2.3 plugin
Reply With Quote #1

I need some help with is probably a very easy thing to do.
But I am still new in coding.

I am making an plugin for ESF1.2.3
The plugin is a melee type plugin.

The problem is that I have no idea how to code how to hit the enemy player and do damage on him.

I allready coded the animations since that was the easiest part lol.
I hope someone can help me with this small issue.
And maybe you can explain abit what the code is doing so I learn from it and gain some knowledge.

Kind Regards

Sting
Sting-lRl- is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 02-04-2010 , 13:01   Re: Help: esf1.2.3 plugin
Reply With Quote #2

You didn't explain what exactly do you want to make.
__________________
hleV is offline
Sting-lRl-
Junior Member
Join Date: Feb 2009
Old 02-05-2010 , 14:35   Re: Help: esf1.2.3 plugin
Reply With Quote #3

Quote:
Originally Posted by hleV View Post
You didn't explain what exactly do you want to make.
Well its a melee plugin. Something like a new melee system.
But the thing is that I know how to code an animation but to actualy hit him and do damage I dont know.

That part of code I need to compleet my plugin.
If someone can make that for me and explain a bit what it does then I can learn from it as well. Its not really easy when you just starting coding.

Kind regards Sting
Sting-lRl- is offline
Sting-lRl-
Junior Member
Join Date: Feb 2009
Old 02-06-2010 , 07:12   Re: Help: esf1.2.3 plugin
Reply With Quote #4

You can help me with this Hlev?
Sting-lRl- is offline
Sting-lRl-
Junior Member
Join Date: Feb 2009
Old 02-07-2010 , 13:13   Re: Help: esf1.2.3 plugin
Reply With Quote #5

Well seems no one can help me out.
Tought there would be at least one who can help out. But seems there was no one. Oh well thanks anyway.

Have fun coding
Sting-lRl- is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 02-07-2010 , 13:20   Re: Help: esf1.2.3 plugin
Reply With Quote #6

I still don't understand what exactly do you want to make.

"Melee plugin" and "new melee system" doesn't really tell a lot.

To damage player, you can execute Ham's TakeDamage.
__________________
hleV is offline
Sting-lRl-
Junior Member
Join Date: Feb 2009
Old 02-09-2010 , 11:44   Re: Help: esf1.2.3 plugin
Reply With Quote #7

I am bussy to code this new melee plugin. The only thing I want to know is how to code the damage to the player part.
Thats all I need to know.

Since here are many amxx coders like your self I was hoping that someone could help me out.
Because thats just the part I dont know how to code.

And if you want more information about the melee plugin it self then you can ask. But what matters me is how I can damage and hit the other players.
Sting-lRl- is offline
Sting-lRl-
Junior Member
Join Date: Feb 2009
Old 02-11-2010 , 16:52   Re: Help: esf1.2.3 plugin
Reply With Quote #8

Quote:
Originally Posted by hleV View Post
I still don't understand what exactly do you want to make.

"Melee plugin" and "new melee system" doesn't really tell a lot.

To damage player, you can execute Ham's TakeDamage.

I found this in another post on this forum.
I see some includes.

The one hamsandwich is this in metamod or anything else??
Or do I need to add a file into ESF to make it work??
And if I need a file where can I get it?

And are you sure this will work in esf and ecx??

Quote:
#include <amxmodx>
#include <hamsandwich>

public plugin_init
()
{
register_plugin("Grenade Damage example", "1.0", "Nomexous"
)
RegisterHam(Ham_TakeDamage, "player", "player_hurt"
)
}

public
player_hurt(player, inflictor, attacker, Float:damage, damagebits
)
{
// We need differentiate gun damage from grenade damage.
// We know for grenade damage, inflictor (the grenade's entity index) will not the the same as attacker (grenade's owner), so:
if (inflictor == attacker) return
HAM_IGNORED

// You can alter the damage dealt. In this case, I doubled the damage dealt. This is very convenient, and not hackish at all.
// Do your own checks here. The variable "player" is the person being hit by the damage.
SetHamParamFloat(4, damage * 2.0
)
return
HAM_HANDLED
}
Sting-lRl- is offline
Reply


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 07:23.


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