SA-MP Forums Archive
How to make when you crash health gos down? - 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 when you crash health gos down? (/showthread.php?tid=444781)



How to make when you crash health gos down? - Guitar - 18.06.2013

How to make when you crash health gos down?, like 5 - one crash?


Re: How to make when you crash health gos down? - Goldilox - 18.06.2013

PHP код:
        new veh,Float:vhp,Float:health;
        
veh GetVehicleID(playerid);
        
GetVehicleHealth(vehicleid,vhp);
        if(
vhp<250.0)
        {
          
GetPayerHealth(playerid,health);
          
SetPlayerHealth(playerid,health-5);
        } 
Am I somewhere close?


Re: How to make when you crash health gos down? - JimmyCh - 18.06.2013

He wants it to remove 5 HP and not set the HP to 5..


Re: How to make when you crash health gos down? - Goldilox - 18.06.2013

Fixed it, hope it is right.