Ocho Posted May 10, 2021 Posted May 10, 2021 Hello! I'm trying to use incomingDamage built-in-function, in order to do some players immortals , but I cant make it work, and the documentation is not the best. I was told that, if i return true, the damage would be canceled I also tried playerDamage function, in order to do the same, but the event does not trigger either.
ryzenje Posted May 10, 2021 Posted May 10, 2021 Hello, try mp._events.add('incomingDamage', (sourceEntity, sourcePlayer, targetEntity, weapon, boneIndex, damage) => { return true; });
Ocho Posted May 10, 2021 Author Posted May 10, 2021 (edited) Thanks for answering. The event still does not trigger. The file is properly included. Perhaps this path is wrong? Btw, the way I'm testing is throwing a molotov, and entering to the fire. It shouldn't matter anyway Edited May 10, 2021 by Ocho
XXX10Tacles Posted May 26, 2025 Posted May 26, 2025 (edited) it didn't work for me so i did like this. Serverside: player.call('setMeInvincible', [true]); Clientside: mp.events.add("setMeInvincible", (yesorno) => { mp.players.local.setInvincible(yesorno); }); Edited May 26, 2025 by XXX10Tacles
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