Help.. GetPlayerHealth
#1

Fixed.
Reply
#2

Wrong bracket.

if(health <25)
{
SetPlayerHealth(playerid, 100);
GivePlayerMoney(playerid, -75);
{

You open twice a statement, instead of closing it.
Reply
#3

Quote:
Originally Posted by S4t3K
Посмотреть сообщение
Wrong bracket.

if(health <25)
{
SetPlayerHealth(playerid, 100);
GivePlayerMoney(playerid, -75);
{

You open twice a statement, instead of closing it.
Can you show me how?
Reply
#4

You just have to replace the second "{" with a "}"
Reply
#5

Ok.. thanks!



-Lock, if can.
Reply
#6

Try this
Код:
CMD:heal(playerid, params[])
{
    new Float:health;
    GetPlayerHealth(playerid, health);
    if(health <25)
    {
        SetPlayerHealth(playerid, 100);
        GivePlayerMoney(playerid, -75);
    }
    else if(health <50)
       {
        SetPlayerHealth(playerid, 100);
		GivePlayerMoney(playerid, -50);
	}
	else if(health <75)
        {
        SetPlayerHealth(playerid, 100);
		GivePlayerMoney(playerid, -25);
	}
	else if(health <100)
        {
        SendClientMessage(playerid, red, "Doctor says: You do not need medical attention!");
	}
	return 1;
}
Reply
#7

Sory for double post
Reply
#8

Quote:
Originally Posted by TazmaNiax
Посмотреть сообщение
Sory for double post
Thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)