altv-issues
altv-issues copied to clipboard
explosion event cancellation is broke
Description of the problem
As soon as you register the explosion event the explosion sync of throwables will break. It doesn't matter if and what you return. see steps below
Reproduction steps
- Use a clean gamemode
- connect to it with 2 players
- throw a grenade Result: Explosion synced
- only register this serverside event (i.e with runtime editor):
alt.on('explosion', (source, type, pos, fx, target) => {
console.log('explosion', source.name, type, pos, fx);
//return true; doesn't work too
});
- retry step 2 and step 3 -> sync broke
Expected behaviour
//still sync the explosion
alt.on('explosion', (source, type, pos, fx, target) => {
console.log('explosion', source.name, type, pos, fx);
});
//still sync the explosion
alt.on('explosion', (source, type, pos, fx, target) => {
console.log('explosion', source.name, type, pos, fx);
return true;
});
//don't sync the explosion
alt.on('explosion', (source, type, pos, fx, target) => {
console.log('explosion', source.name, type, pos, fx);
return false;
});
Additional context
used linux server binaries client version: 12.10 release server version: 12.10 release
maybe it affects other cancelable events too
Operating system
Ubuntu 20.04
Version
12.10 release
Can you test if its a js or core issue?
Can you test if its a js or core issue?
@FabianTerhorst i tested it with c#-module too now and it's the same... so it's core related
more info: POV thrower: everything is working as intended POV target: sees grenade/molotov flying, for grenades sees no explosion but gets dmg... for molotovs the fire on the ground is synced but the explosion of the molotov isn't synced, too
Hi , i've the same probleme with an only if into the event without any return as tasty say , the explosion work on thrower but not synced on target ( tested with vehicle explosion and rpg)
Would fix it as soon as possible, it's impossible to fight cheaters without it
Fixed in 12.22
more info: POV thrower: everything is working as intended POV target: sees grenade/molotov flying, for grenades sees no explosion but gets dmg... for molotovs the fire on the ground is synced but the explosion of the molotov isn't synced, too
@tastydev for damage you also need to cancel weaponDamage event