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



health - Lukasz56 - 08.03.2017

why does it heal me if i have more than 100 score ?

Код:
     if(pickupid == newbiepickup)
     {
     if(GetPlayerScore(playerid) < 100)
     {
     SetPlayerHealth(playerid,100);
     }else SendClientMessage(playerid,-1,"- ");
     }



Re: health - JessThompson - 08.03.2017

Код:
if(pickupid == newbiepickup)
{
	if(GetPlayerScore(playerid) <= 100)
	{
    	SetPlayerHealth(playerid,100);
	}
	else SendClientMessage(playerid,-1,"- ");
}
So it lets you heal if your score is what value exactly?


Re: health - Lukasz56 - 08.03.2017

i need that if player has more than 100 score it wouldn't heal him


Re: health - Banditul18 - 08.03.2017

Put > instead of <


Re: health - Lukasz56 - 08.03.2017

Quote:
Originally Posted by Banditul18
Посмотреть сообщение
Put > instead of <
still the same thing


Re: health - JessThompson - 08.03.2017

Double check make sure your score is being set by

SetPlayerScore