Kelvenbrryan Posted January 15, 2022 Share Posted January 15, 2022 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 ds1-e Posted January 15, 2022 Scripting Moderators Share Posted January 15, 2022 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
Kelvenbrryan Posted January 16, 2022 Author Share Posted January 16, 2022 I'm an apprentice bro how can I do this please Link to comment
Scripting Moderators ds1-e Posted January 18, 2022 Scripting Moderators Share Posted January 18, 2022 (edited) 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 January 18, 2022 by srslyyyy Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now