-Andreas Posted July 11, 2018 Share Posted July 11, 2018 Hello o/ I can't seem to make my ped killable in any way. The API; streamPed.setCanBeDamaged(true); streamPed.setInvincible(false); streamPed.setOnlyDamagedByPlayer(true); doesn't seem to do anything. I've tried using natives as well and messed around with the setHealth, getHealth, setMaxHealth & getMaxHealth APIs as well but with no luck. I also tried using relationshipGroups and making the player group able to damage the ped group.(Didn't work) I'm unable to detect the ped on the client event playerWeaponShot as so; mp.events.add('playerWeaponShot', (targetPosition, targetEntity) => { targetEntity always returns null when hitting the ped. }); So I'm running out of ideas.. Would I have to raycast from my gun when shooting and see if that perhaps hits the ped? Or is there an easier fix for my issue. Thanks! /Andreas 1 Link to comment Share on other sites More sharing options...
CaptainKanone Posted May 4, 2019 Share Posted May 4, 2019 Have you found a solution? Link to comment Share on other sites More sharing options...
taywon Posted July 27, 2019 Share Posted July 27, 2019 On 5/4/2019 at 1:56 PM, CaptainKanone said: Have you found a solution? Use raycasting to detect what ped you're hitting ! Link to comment Share on other sites More sharing options...
Doom Posted July 27, 2019 Share Posted July 27, 2019 Have you tried this streamPed.setProofs(false, false, false, false, false, false, false, false); 1 Link to comment Share on other sites More sharing options...
taywon Posted July 27, 2019 Share Posted July 27, 2019 (edited) 1 hour ago, Doom said: Have you tried this streamPed.setProofs(false, false, false, false, false, false, false, false); OMFG, it works, thanks Edited July 27, 2019 by taywon Link to comment Share on other sites More sharing options...
St3fan[NL] Posted March 31, 2021 Share Posted March 31, 2021 On 7/27/2019 at 11:34 AM, taywon said: OMFG, it works, thanks This solution did not work for me. Link to comment Share on other sites More sharing options...
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