OnPlayerOnShoot.
#8

Uhm.
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);
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.
Reply


Messages In This Thread
OnPlayerOnShoot. - by Darnell - 12.08.2011, 10:30
Re: OnPlayerOnShoot. - by Darnell - 12.08.2011, 11:45
Re: OnPlayerOnShoot. - by Darnell - 12.08.2011, 12:11
Re: OnPlayerOnShoot. - by emokidx - 12.08.2011, 12:14
Re: OnPlayerOnShoot. - by Snipa - 12.08.2011, 12:16
Re: OnPlayerOnShoot. - by Darnell - 12.08.2011, 12:17
Re: OnPlayerOnShoot. - by Snipa - 12.08.2011, 12:19
Re: OnPlayerOnShoot. - by Darnell - 12.08.2011, 12:21
Re: OnPlayerOnShoot. - by Snipa - 12.08.2011, 12:25
Re: OnPlayerOnShoot. - by Darnell - 12.08.2011, 12:36

Forum Jump:


Users browsing this thread: 2 Guest(s)