Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an extended player's DeathMsg message #858

Merged
merged 5 commits into from
Sep 28, 2023
Merged

Conversation

s1lentq
Copy link
Owner

@s1lentq s1lentq commented Sep 7, 2023

Description
These changes introduces enhancements to the DeathNotice function,
providing extra death flags to convey more information in death messages.
These flags are used to include extra details about player deaths, making death messages more informative

  • Extra Death Flags:

    • PLAYERDEATH_POSITION (Bit 1):
      Position of Victim's Death: This flag includes the coordinates (X, Y, Z) of the place where the victim died.
      It is useful for displaying a 'dead icon' on the HUD radar, indicating the victim's death location.

    • PLAYERDEATH_ASSISTANT (Bit 2):
      Index of Assistant: When set, this flag includes the index of the assisting player who helped the attacker kill the victim. It allows players to know who assisted in the kill.

    • PLAYERDEATH_KILLRARITY (Bit 4):
      Kill Rarity Classification: This flag adds a rarity classification to the death message.
      It includes information about the rarity of the kill, such as headshot kills, kills through walls, flash assists, and more.
      These classifications make death messages more engaging by highlighting exceptional kills.

      • Headshot Kill: Indicates that the victim was killed by a headshot, signifying exceptional accuracy and precision.

      • No-Scope Kill: Denotes a kill with a sniper rifle without using the scope, showcasing remarkable skill and reflexes.

      • Penetrated Kill: Highlights kills made through walls or objects, demonstrating tactical prowess.

      • Flash Assist: Marks kills assisted by flashbang grenades, revealing coordinated teamwork.

      • And More: Additional classifications may be introduced to further enrich the gameplay experience.

Usage for Developers:
AMXX plugin developers can use these flags to extract valuable information, such as kill rarity and other details, for use in their plugins.
Functions like hookchain CSGameRules_SendDeathMessage, register_message and register_event can be employed to access this additional information.

Benefits client-side for unofficial clients:
These enhancements extend beyond the official game, but it can benefit unofficial game clients as well. Non-official clients can use this additional information to create visual enhancements and customizations. This allows for a richer gaming experience and increased player engagement.

Fix testdemos
@s1lentq s1lentq changed the title Add an extended user DeathMsg message Add an extended player's DeathMsg message Sep 7, 2023
@q52888940
Copy link

Don't need an spr?

@axl303
Copy link

axl303 commented Sep 7, 2023

Should we see the assist nickname or something in the DeathMsg? Assuming pAssister?

SendDeathMessage(pAttacker, pVictim, pAssister, killer_weapon_name, iDeathMessageFlags, iRarityOfKill);

Example: Player1 + Player2 > killed Player3
Tested with "mp_assist_damage_threshold (def) 40, also with 10" and I don't see a KillAssist name in DeathMsg
Also with mp_deathmsg_flags 1-7 (2) and still nothing.

Sorry for the stupid question, but I don't get it 😅

@q52888940
Copy link

Do you support zbot?

@Nord1cWarr1or
Copy link
Contributor

Should we see the assist nickname or something in the DeathMsg? Assuming pAssister?

SendDeathMessage(pAttacker, pVictim, pAssister, killer_weapon_name, iDeathMessageFlags, iRarityOfKill);

Example: Player1 + Player2 > killed Player3
Tested with "mp_assist_damage_threshold (def) 40, also with 10" and I don't see a KillAssist name in DeathMsg
Also with mp_deathmsg_flags 1-7 (2) and still nothing.

Sorry for the stupid question, but I don't get it 😅

Have you read the above text?

AMXX plugin developers can use these flags to extract valuable information, such as kill rarity and other details, for use in their plugins.
Functions like register_message and register_event can be employed to access this additional information.

Reworked SendDeathMessage
Minor cleanup
@StevenKal
Copy link
Contributor

StevenKal commented Sep 7, 2023

Good feature.
But, since when those extras "DeathMsg" features/parameters have been implemented on the client?

@SmileYzn
Copy link

SmileYzn commented Sep 8, 2023

Good feature. But, since when those extras "DeathMsg" features/parameters have been implemented on the client?

NEVER!

@wopox1337
Copy link
Collaborator

But, since when those extras "DeathMsg" features/parameters have been implemented on the client?

@StevenKal You can implement this on your client if you practice. The standard vanilla client does not have these features.

@StevenKal
Copy link
Contributor

StevenKal commented Sep 8, 2023

O.K., I supposed this had been implemented on a client update I was not aware of, that's why s1lentq added such but in fact he just extended so we can retrieve those infos via plugins, nothing more. And since "DeathMsg" is registered with "-1" for no specific size... so, extendable when we wish.

@FEDERICOMB96
Copy link
Contributor

FEDERICOMB96 commented Sep 12, 2023

Nice!
I have one more suggestion. You can also add "domination/revenge" as part of "kill rarity".

Example video
https://www.youtube.com/watch?v=cnMWoupwH6s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants