@@ -327,7 +327,7 @@ public static void RegisterEvents(object target)
327327 {
328328 typeof ( IPlayer ) , typeof ( IEntity ) , typeof ( uint ) , typeof ( ushort ) ,
329329 typeof ( Position ) , typeof ( BodyPart )
330- } , typeof ( uint ) ) ;
330+ } , new [ ] { typeof ( uint ) , typeof ( bool ) } ) ;
331331 if ( scriptFunction == null ) return ;
332332 OnWeaponDamage +=
333333 ( player , targetEntity , weapon , damage , shotOffset , damageOffset ) =>
@@ -338,9 +338,14 @@ public static void RegisterEvents(object target)
338338 scriptFunction . Set ( damage ) ;
339339 scriptFunction . Set ( shotOffset ) ;
340340 scriptFunction . Set ( damageOffset ) ;
341- if ( scriptFunction . Call ( ) is uint value )
341+ if ( scriptFunction . Call ( ) is uint uintValue )
342342 {
343- return value ;
343+ return uintValue ;
344+ }
345+
346+ if ( scriptFunction . Call ( ) is bool boolValue )
347+ {
348+ return boolValue ;
344349 }
345350
346351 return 0 ;
@@ -370,7 +375,7 @@ public static void RegisterEvents(object target)
370375 {
371376 typeof ( IPlayer ) , typeof ( ExplosionType ) , typeof ( Position ) , typeof ( uint ) ,
372377 typeof ( IEntity )
373- } , typeof ( bool ) ) ;
378+ } , new [ ] { typeof ( bool ) } ) ;
374379 if ( scriptFunction == null ) return ;
375380 OnExplosion += ( player , explosionType , position , explosionFx , targetEntity ) =>
376381 {
@@ -394,7 +399,7 @@ public static void RegisterEvents(object target)
394399 new [ ]
395400 {
396401 typeof ( IPlayer ) , typeof ( FireInfo [ ] )
397- } , typeof ( bool ) ) ;
402+ } , new [ ] { typeof ( bool ) } ) ;
398403 if ( scriptFunction == null ) return ;
399404 OnFire += ( player , fireInfos ) =>
400405 {
@@ -416,7 +421,7 @@ public static void RegisterEvents(object target)
416421 {
417422 typeof ( IPlayer ) , typeof ( Position ) , typeof ( Position ) , typeof ( uint ) ,
418423 typeof ( uint )
419- } , typeof ( bool ) ) ;
424+ } , new [ ] { typeof ( bool ) } ) ;
420425 if ( scriptFunction == null ) return ;
421426 OnStartProjectile += ( player , startPosition , direction , ammoHash , weaponHash ) =>
422427 {
@@ -530,7 +535,7 @@ public static void RegisterEvents(object target)
530535 new [ ]
531536 {
532537 typeof ( IVehicle ) , typeof ( IPlayer ) , typeof ( bool )
533- } , typeof ( bool ) ) ;
538+ } , new [ ] { typeof ( bool ) } ) ;
534539 if ( scriptFunction == null ) return ;
535540 OnVehicleHorn += ( targetVehicle , reporterPlayer , state ) =>
536541 {
@@ -698,7 +703,7 @@ public static void RegisterEvents(object target)
698703 new [ ]
699704 {
700705 typeof ( IPlayer ) , typeof ( int )
701- } , typeof ( bool ) ) ;
706+ } , new [ ] { typeof ( bool ) } ) ;
702707 if ( scriptFunction == null ) return ;
703708 OnRequestSyncScene += ( source , sceneId ) =>
704709 {
0 commit comments