Jump to content

help, hitmark dayz sniper


Kelvenbrryan

Recommended Posts

I know a server that whenever you hit another player, it appears that you hit him and he dies, and hits in the lag do 1 damage.
The blood of the hit player remains at 12000 but he dies, sometimes when hit also goes to 11999, but still dies ...
I would like to know if it is possible to create a script capable of causing that when a Hitmarker is activated, the affected player dies instantly.

Link to comment
  • Scripting Moderators

Hit markers are probably based off attacker sync, use onClientPlayerDamage event (bind it to root), check if attacker equal to localPlayer, and then kill player if required (triggerServerEvent, and kill player server-side)

Link to comment
  • Scripting Moderators
On 16/01/2022 at 05:57, Kelvenbrryan said:

I'm an apprentice bro how can I do this please

function onClientPlayerDamage(pAttacker, pDamage, pBodypart)
	local localAttacker = pAttacker == localPlayer

	if not localAttacker then
		return false
	end

	-- do trigger event to server, preferrably do some check if victim ~= localPlayer; victim in this case is 'source' (without ')
end
addEventHandler("onClientPlayerDamage", root, onClientPlayerDamage)

Note that i won't do everything for you, for next part please read:
 

 

Edited by srslyyyy
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...