[Include] OnPlayerDamage(with HealthLost and ArmourLost) 0.3d
#1

OnPlayerDamage include v3


v3: include renamed to OnPlayerDamage, added OnPlayerGiveDamage.

Find your callback
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid)
Replace with
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float:HealthLost, Float:ArmourLost, weaponid)
Find your callback
pawn Код:
public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid)
Replace with:
pawn Код:
public OnPlayerGiveDamage(playerid, damagedid, Float:HealthLost, Float:ArmourLost, weaponid)
And of course, include this on top:
pawn Код:
#include <OPTDex>
Download:
Version 3.0 HERE
Version 2.0: HERE
Version 1.1: HERE

Enjoy!
Haven't tested it well, because not using 0.3d ATM.
Reply
#2

Awesomeee ^^
Reply
#3

wups, I got shot!

I'll check it out, Nice work.
Reply
#4

Pastebin please?
Reply
#5

Quote:
Originally Posted by Kar
Посмотреть сообщение
Pastebin please?
http://pastebin.com/pzr2xNxt


I will test it right now. Good job, thanks.
Reply
#6

Another great include from you, well done.

I hope this is working. xD
Reply
#7

If i understand, it will show how many HP and Armour the player pointed lost?
Reply
#8

This is a really inefficient way of doing it. With some maths you can easily work it out from 'amount'.
Reply
#9

This is a really cool idea but I really don't see the point of the timer. You can track the last damage taken with that callback rather then a constant 1 second timer looping around every player.
Reply
#10

Quote:
Originally Posted by MP2
Посмотреть сообщение
This is a really inefficient way of doing it. With some maths you can easily work it out from 'amount'.
I don't think so. The health could be 120 and armour 10. How would you calculate that?

Quote:
Originally Posted by [HiC]TheKiller
Посмотреть сообщение
This is a really cool idea but I really don't see the point of the timer. You can track the last damage taken with that callback rather then a constant 1 second timer looping around every player.
Then the first time player gets damaged will go wrong.
Maybe i should try binding to SetPlayerHealth/Armour.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)