Burgershot
  • Home
  • Members
  • Team
  • Help
  • Search
  • Register
  • Login
  • Home
  • Members
  • Help
  • Search
Burgershot open.mp Questions and Suggestions [Suggestion] Control over damage & death

 
  • 0 Vote(s) - 0 Average
Suggestion Control over damage & death
Manyula
Offline

Burgershot Member
Posts: 52
Threads: 5
Joined: Apr 2019
Reputation: 5
Location: Germany
#1
2020-04-26, 05:26 PM
OnPlayerTakeDamage is currently called after a player has already taken the damage. This makes it impossible to make a custom damage system.

1. OnPlayerGiveDamage does the same thing. This callback seems redundant anyway since we got lag compensation with 0.3z, no idea why that's still around.
2. OnPlayerWeaponShot prevents bullet data from being sent entirely. People don't even see when they are hit.
3. SetPlayerTeam does not prevent self-inflicted damage.

I'd like to suggest calling OnPlayerTakeDamage BEFORE a player takes damage. This way all damage could be prevented - but not all death events which brings me to my next point: death events hardcoded into the game, like a car explosion while being in the driver's seat or a parachute splat. Having greater control over these as well would give us total control over any and all damage and death events.
Ezio_Auditore
Offline

Burgershot Member
Posts: 23
Threads: 1
Joined: Apr 2019
Reputation: 1
#2
2020-04-26, 07:22 PM (This post was last modified: 2020-04-26, 07:23 PM by Ezio_Auditore.)
Well, to be honest this is already possible with a workaround, weapon-config.inc by Slice it's maybe the most famous example. I would focus more on the OnPlayerWeaponShot callback which it's kinda buggy since it doesnt even got triggered in some situations
Manyula
Offline

Burgershot Member
Posts: 52
Threads: 5
Joined: Apr 2019
Reputation: 5
Location: Germany
#3
2020-04-26, 07:41 PM
The thing about weapon-config is that it relies on SKY which is a memory-hacking plugin. I think adding this natively is the better way to go.
DTV
Offline

The dude
Posts: 45
Threads: 4
Joined: Apr 2019
Reputation: 4
#4
2020-04-26, 08:44 PM (This post was last modified: 2020-04-26, 08:46 PM by DTV.)
Maybe doing something similar to how zcmd has OnCommandProcessed (called when command is executed) and OnCommandRecieved (called when attempt to use command is detected) where we have callbacks for when damage info has been received (before dmg is applied) and processed (after dmg is applied) by the server.
Stoned Ape
Manyula
Offline

Burgershot Member
Posts: 52
Threads: 5
Joined: Apr 2019
Reputation: 5
Location: Germany
#5
2020-04-26, 08:57 PM (This post was last modified: 2020-04-27, 09:53 AM by Manyula.)
(2020-04-26, 08:44 PM)DTV Wrote: Maybe doing something similar to how zcmd has OnCommandProcessed (called when command is executed) and OnCommandRecieved (called when attempt to use command is detected) where we have callbacks for when damage info has been received (before dmg is applied) and processed (after dmg is applied) by the server.

I'd personally go with OnPlayerTakeDamage (present tense) and OnPlayerDamageTaken (past tense). I think this wording would be much clearer than OnPlayerDamageReceived and OnPlayerDamageProcessed.
« Next Oldest | Next Newest »



  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Burgershot - Powered by our Community and MyBB Original Theme by Emerald

Linear Mode
Threaded Mode