0 Members and 2 Guests are viewing this topic.
function OnPlayerDamage(Victim, Shooter: Byte; Damage: Integer) : integer;begin if (GetPlayerStat(Shooter,'Active')) and (GetPlayerStat(Shooter,'Human')) = true then begin Damage := Damage; end; Result := Damage; DrawText(Victim,'Your health '+INTtoSTR(GetPlayerStat(Victim,'health')-damage)+'/150',300,RGB(251,218,34),0.12,20,370);end;
This is not a Soldat Central script, despite stealing the post format and download image to try make it look like one. I suggest you remove my download button image, unauthorized use will result in goatse.Also script is pointless.
if (GetPlayerStat(Shooter,'Active')) and (GetPlayerStat(Shooter,'Human')) = true then begin Damage := Damage; end;
INTtoSTR(GetPlayerStat(Victim,'health')-damage)
Also the player's health isnt altered until after onplayerdamage exits, so it needs to be like this or it will show the players previous health.Code: [Select]INTtoSTR(GetPlayerStat(Victim,'health')-damage)