29.11.2013, 08:36
(
Последний раз редактировалось Ballu Miaa; 29.11.2013 в 14:45.
)
You can use wups include called OnPlayerShootPlayer. You need put the include in your /pawn/includes folder!
Then you need to add this on the top of your script after include <a_samp>.
Then you can use the following callback.
EDIT:
I just realized that i forgot about the new callbacks introduced by SAMP Team.
Thanks to iZN and Chasm.
Then you need to add this on the top of your script after include <a_samp>.
pawn Код:
#include <OPSP>
pawn Код:
public OnPlayerShootPlayer(Shooter,Target,Float:HealthLost,Float:ArmourLost)
{
new Float:health;
if(GetPlayerWeapon(Shooter) == 24)//Lets say u wanted to increase damage of Deagle which is ID 24.
{
GetPlayerHealth(Target,health);//Get the remaining health after getting shot.
SetPlayerHealth(Target, health-5);//Deduct more 5 health from the Victim. You can increase this number for more health.
return 1;
}
}
EDIT:
I just realized that i forgot about the new callbacks introduced by SAMP Team.
Thanks to iZN and Chasm.
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
new Float:Health;
GetPlayerHealth(playerid, Health);
if(weaponid == 24) SetPlayerHealth(playerid, Health-5);
return 1;
}

