Quote:
Originally Posted by Randy More
There's an include that provides you "OnPlayerShootPlayer" callback, you can get it from here.
After you have it installed (( Adding the pastebin to a .ini file, #include 'file name' ))
Make this Callback:
pawn Код:
public OnPlayerShootPlayer(Shooter,Target,Float:HealthLost,Float:ArmourLost) { return 1; }
And there you go:
pawn Код:
public OnPlayerShootPlayer(Shooter,Target,Float:HealthLost,Float:ArmourLost) { if(GetPlayerWeapon(shooter) == 24) { new float: hp; GetPlayerHealth(target, hp); SetPlayerHealth(target, hp-70); } return 1; }
Enjoy.
|
Include is not needed anymore, there are functions already included in a_samp called OnPlayerGiveDamage and OnPlayerTakeDamage.