0 Members and 1 Guest are viewing this topic.
(00:19:56) [*] Run-time error (OnPlayerDamage): Invalid Opcode(00:19:56) Scripting is now disabled due to an error in your script.(00:19:56) A copy of this error can be found in /logs/scriptlog.txt(00:21:49) Server: Scripting has been disabled on your server due to an error in your script.
function OnPlayerDamage(Victim, Shooter: byte; Damage: integer): integer;var poop: integer; hp: integer;begin if ( Victim <> Shooter ) then begin poop := 149 - GetPlayerStat( Shooter, 'health' ); if ( ( GetPlayerStat( Shooter, 'Primary' ) = 7 ) or ( GetPlayerStat( Shooter, 'Primary' ) = 8 ) or ( GetPlayerStat( Shooter, 'Primary' ) = 13 ) or ( GetPlayerStat( Shooter, 'Primary' ) = 15 ) or ( GetPlayerStat( Shooter, 'Primary' ) = 17 ) ) then begin hp := 0; end else begin hp := Round( 0.8 * Damage ); end; if ( hp < poop ) then begin DoDamage( Shooter, - hp ); end else begin DoDamage( Shooter, - poop ); end; end; result := Damage;end;
if ( Victim <> Shooter ) then...