SA-MP Forums Archive
How to make it heart attack this? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How to make it heart attack this? (/showthread.php?tid=493657)



How to make it heart attack this? - Lloyde - 09.02.2014

HOW TO MAKE THIS 50-50 the life of player WHEN YOU BUY THIS PILLS IN PHARMACY, AND WHEN YOU USE IT YOU HAVE 50-50 of HEART ATTACK HOW TO MAKE IT 50-50 HEART ATTACK IF YOU ARE NOT GOLD DONATOR YOU WILL BE HEART ATTACK OR YOU WILL SURVIVE FOR HEART ATTACK BECAUSE OF RANDOMIZE IT ON SCRIPT, BUT WHEN YOU ARE A GOLD DONATOR SAME AS THE NOT GOLD DONATOR PLAYER YOU WILL HAVE 50-50 OF HEART ATTACK


PLEASE HELP ME IN THIS SCRIPT THANKS



pawn Код:
forward pills5(playerid);
public pills5(playerid)
{
    if(GetPVarInt(playerid, "usingpills") == 1)
    {
        new Float:armour;
        new Float:chealth;
        GetPlayerArmour(playerid, armour);
        GetPlayerHealth(playerid, chealth);
        if(armour < 100.0)
        {
            if((armour+100.0) <= 100.0, (chealth+100.0) <= 100.0)
            {
                SetPlayerArmourEx(playerid, armour+100.0);
                SetPlayerHealth(playerid, chealth+100.0);
            }
            else
            {
                GetPlayerArmour(playerid, armour);
                GetPlayerHealth(playerid, chealth); // kung mali try GetPlayerHealthEx(playerid,chealth);
                armour-=100.0;
                chealth -=100.0;
                SetPlayerArmour(playerid, armour);
                SetPlayerHealth(playerid, chealth);
            }
        }
    }
}



Re: How to make it heart attack this? - Lloyde - 09.02.2014

Hello anybody can help me