Skip to content

Commit

Permalink
fix(server): fix OnWeaponDamage response for Registered event
Browse files Browse the repository at this point in the history
  • Loading branch information
Doxoh committed Dec 25, 2023
1 parent 62609f5 commit 78e2840
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions api/AltV.Net/Alt.RegisterEvents.cs
Original file line number Diff line number Diff line change
Expand Up @@ -338,14 +338,9 @@ public static void RegisterEvents(object target)
scriptFunction.Set(damage);
scriptFunction.Set(shotOffset);
scriptFunction.Set(damageOffset);
if (scriptFunction.Call() is uint uintValue)
if (scriptFunction.Call() is WeaponDamageResponse response)
{
return uintValue;
}

if (scriptFunction.Call() is bool boolValue)
{
return boolValue;
return response;
}

return 0;
Expand Down

0 comments on commit 78e2840

Please sign in to comment.