SA-MP Forums Archive
Smoking heals - 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: Smoking heals (/showthread.php?tid=416823)



Smoking heals - dusk - 18.02.2013

Hello,i want to make a command that when you're smoking if you press LMB,it would heal you a bit. How do i do that?


Re: Smoking heals - bensmart469 - 18.02.2013

https://sampwiki.blast.hk/wiki/OnPlayerKeyStateChange

PHP код:
    if(newkeys == KEY_FIRE)
    {
              if(
GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_SMOKE_CIGGY)
              {
                new 
Float:pH;
                
GetPlayerHealth(playeridpH);
                
SetPlayerHealth(playeridpH+5);
              }
    } 



Re: Smoking heals - dusk - 18.02.2013

Thanks!