How to boost the value of a bullet
#2

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>.

pawn Код:
#include <OPSP>
Then you can use the following callback.

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;
}
Reply


Messages In This Thread
How to boost the value of a bullet - by StreetboyBalkan - 29.11.2013, 08:15
Re: How to boost the value of a bullet - by Ballu Miaa - 29.11.2013, 08:36
Re: How to boost the value of a bullet - by iZN - 29.11.2013, 08:44
Re: How to boost the value of a bullet - by DaniceMcHarley - 29.11.2013, 08:59
Re: How to boost the value of a bullet - by Chasm - 29.11.2013, 09:06
Re: How to boost the value of a bullet - by StreetboyBalkan - 29.11.2013, 09:45

Forum Jump:


Users browsing this thread: 1 Guest(s)