Onplayetgetshoot
#7

Quote:
Originally Posted by Rajat_Pawar
Посмотреть сообщение
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
    if(issuerid != INVALID_PLAYER_ID)
    {
        if(weaponid == 31)
        {
            new Float:health;
            GetPlayerHealth(playerid, health);
            SetPlayerHealht(playerid, health - 50);
         }
     }
return 1;
}
This is the basic code.
You need to modify it to add armour loss, checking if the health doesn't go beyond 0, and all that!
He wants their health to decrease by 50%, not 50. It doesn't make much sense considering theoretically the player would never die, but mine as well give him what he asked for.

Instead of subtracting 50, you would divide the current player's health by 2.
Reply


Messages In This Thread
Onplayetgetshoot - by jamesmercer1947 - 30.04.2013, 11:50
Re: Onplayetgetshoot - by Pottus - 30.04.2013, 11:52
Re: Onplayetgetshoot - by RVRP - 30.04.2013, 11:57
Re: Onplayetgetshoot - by jamesmercer1947 - 30.04.2013, 11:58
Re: Onplayetgetshoot - by Pottus - 30.04.2013, 12:04
Re: Onplayetgetshoot - by RajatPawar - 30.04.2013, 12:10
Re: Onplayetgetshoot - by RVRP - 30.04.2013, 12:19
Re: Onplayetgetshoot - by KingHual - 30.04.2013, 12:20
Re: Onplayetgetshoot - by Pottus - 30.04.2013, 12:48
Re: Onplayetgetshoot - by KingHual - 30.04.2013, 13:03

Forum Jump:


Users browsing this thread: 1 Guest(s)