0 Members and 3 Guests are viewing this topic.
function GetPlayerStat(ID: byte; Stat: string): Variantfunction CreateBullet(X,Y,VelX,VelY,HitM: Single; sStyle, Owner: Byte): integerfunction OnPlayerDamage(Victim, Shooter: byte; Damage: integer): integer;If Team = 1 ThenBegin CreateBullet(Shooter.X+10,Shooter.Y+10,0,1,25,4,Shooter); CreateBullet(Shooter.X-10,Shooter.Y+10,0,1,25,4,Shooter); CreateBullet(Shooter.X+10,Shooter.Y-10,0,1,25,4,Shooter); CreateBullet(Shooter.X-10,Shooter.Y-10,0,1,25,4,Shooter);End
function OnPlayerDamage(Victim, Shooter: byte; Damage: integer): integer;var x, y: single;begin if GetPlayerStat( Shooter, 'Team' ) = 1 then begin x := GetPlayerStat( Shooter, 'X' ); y := GetPlayerStat( Shooter, 'Y' ); CreateBullet( x + 10, y + 10, 0, 1, 25, 4, Shooter ); CreateBullet( x - 10, y + 10, 0, 1, 25, 4, Shooter ); CreateBullet( x + 10, y - 10, 0, 1, 25, 4, Shooter ); CreateBullet( x - 10, y - 10, 0, 1, 25, 4, Shooter ); end;end;