If you wanted a OnPlayerShoot event for anything else, i did make a semi-buggy one that is called most of the time a player shoots, although as said, it will probably lower performance on the server a lot.
procedure OnPlayerShoot(ID, Weapon: byte);
begin
Command('/say ' + GetPlayerStat(ID,'Name') + ' has fired a ' + WeaponNamebyNum(Weapon) + '.');
end;
procedure ShootCheckLoop;
var
i: byte;
Ammo, Weap: array[1..32] of byte;
begin
WriteLn('ShootCheckLoop Initialized')
while true do begin
for i := 1 to 32 do if (GetPlayerStat(i,'Active') = true) and (GetPlayerStat(i,'Ammo') <> Ammo[i]) then begin
if (GetPlayerStat(i,'Primary') = Weap[i]) and (GetPlayerStat(i,'Ammo') <> 0) and (GetPlayerStat(i,'Ammo') < Ammo[i]) then OnPlayerShoot(i,GetPlayerStat(i,'Primary'));
Weap[i] := GetPlayerStat(i,'Primary');
Ammo[i] := GetPlayerStat(i,'Ammo');
end;
end;
end;
procedure ActivateServer();
begin
ThreadFunc([],'ShootCheckLoop');
end;
Adding a sleep and making a thing that calls the OnPlayerShoot procedure multiple times after the sleep would probably make server performance a bit better, but will probably still be slow.