12.08.2011, 12:21
Uhm.
Will it tell me that If hit the player with a distance of a sniper rifle ?
EDIT:
I think you got me wrong.
This is the code, It tells me that I hit the player, but when I use a sniper rifle, it doesn't show me the damage, because it's too far, I guess.
Will it tell me that If hit the player with a distance of a sniper rifle ?
EDIT:
I think you got me wrong.
pawn Код:
new TargetName[MAX_PLAYER_NAME];
new ShooterName[MAX_PLAYER_NAME];
GetPlayerName(Target,TargetName,MAX_PLAYER_NAME);
GetPlayerName(Shooter,ShooterName,MAX_PLAYER_NAME);
new gun=GetPlayerWeapon(Shooter);
new string[128];
new wepname[30];
GetWeaponName(gun,wepname,sizeof(wepname));
format(string,sizeof(string),"~n~~n~~w~You hit ~r~%s ~w~Damage:~r~ %i ~w~Weapon:~r~%s",TargetName,floatround(HealthLost+ArmourLost),wepname);
GameTextForPlayer(Shooter,string,3000,5);
format(string,sizeof(string),"~n~~n~~w~You got hit by ~r~%s ~w~Damage:~r~ %i ~w~Weapon:~r~%s",ShooterName,floatround(HealthLost+ArmourLost),wepname);
GameTextForPlayer(Target,string,3000,5);