I am currently back on working for my L4D server.. I (nearly) finished my boomer script.. BUT I need something for it to entirely work!
//Boomer script by D4NG3R
function OnPlayerDamage(Shooter, Boomer: byte; Damage: integer): integer;
var Bx,By,Sx,Sy: single;
begin
if (IdToName(Boomer) = 'Boomer') and (IdToName(shooter) <> 'Major') then begin
Bx := GetPlayerStat(Boomer,'X');
By := GetPlayerStat(Boomer,'Y');
Sx := GetPlayerStat(Shooter,'X');
Sy := GetPlayerStat(Shooter,'Y');
If (Distance(Bx,By,Sx,Sy) < 250) and (GetPlayerStat(Boomer,'Alive') = False) and (GetPlayerStat(Shooter,'Alive') = True) then begin
WriteConsole(Shooter,'A boomer just Vommited on you!',RGB(150,200,150))
WriteConsole(Shooter,'A couple of zombies where attracted by the vommit!',RGB(200,150,150))
WriteConsole(Shooter,'A zombie hits you!',RGB(200,150,150))
CreateBullet(Sx+5,Sy,50,0,10,1,Boomer);
WriteConsole(Shooter,'A zombie hits you!',RGB(200,150,150))
CreateBullet(Sx-5,Sy,-50,0,10,1,Boomer);
end;
end;
Result := Damage;
end;
procedure OnPlayerKill(Shooter, Boomer: byte; Weapon: string);
var Bx,By,Sx,Sy: single;
begin
if (IdToName(Boomer) = 'Boomer') and (IdToName(Shooter) <> 'Major') then begin
Bx := GetPlayerStat(Boomer,'X');
By := GetPlayerStat(Boomer,'Y');
Sx := GetPlayerStat(Shooter,'X');
Sy := GetPlayerStat(Shooter,'Y');
CreateBullet(Bx,By,9,0,5,14,Boomer);
CreateBullet(Bx,By,-9,0,5,14,Boomer);
CreateBullet(Bx,By,8,-2,5,14,Boomer);
CreateBullet(Bx,By,-8,-2,5,14,Boomer);
CreateBullet(Bx,By,6,-4,5,14,Boomer);
CreateBullet(Bx,By,-6,-4,5,14,Boomer);
CreateBullet(Bx,By,4,-6,5,14,Boomer);
CreateBullet(Bx,By,-4,-6,5,14,Boomer);
CreateBullet(Bx,By,2,-7,5,14,Boomer);
CreateBullet(Bx,By,-2,-7,5,14,Boomer);
CreateBullet(Bx,By,0,-7,5,14,Boomer);
WriteConsole(Shooter,'You killed the Boomer',RGB(75,150,75))
end;
end;
^Works, I have been playing with this for the whole afternoon.
I need some help tho.. Between the "Boomer vommited on you" "couple of zombies where attracted by the vommit" and those two hits I need pauses of 3/4 seconds..
using
sleep(5000);
Just freezes the server for 5 seconds...
+ is there an easier way to just give a player 20 damage instead of spawning a bullet next to them...?
---
Next up smoker
What basically needs to happen is this:
Everyone that is named SMOKER and is on BLUE team (bots) spawn a flame in the middle of them (create bullet) every 4 seconds, to give an effect like they are burning this flame should have a damage multiplier of 0 (no damage).