How to boost the value of a bullet
#3

Quote:
Originally Posted by Ballu Miaa
Посмотреть сообщение
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;
    }
}
That's outdated mate. SA-MP has made a callback 'OnPlayerTakeDamage'

pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
    // Check if the issuer (attacker) exist and using a deagle (weapon id 24)
    if(issuerid != INVALID_PLAYER_ID && weaponid == 24)
    {
         // The 'amount' is combined health + armour.
         SetPlayerHealth(playerid, amount - 5); // You have deducted -5 amount from the player (victim).
         return true;
    }
}
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)