Noob Question *In Need Of Help ASAP*
#5

Quote:
Originally Posted by [SU]Balli
Посмотреть сообщение
Код:
if (strcmp("/Ikky Wikky Medicine *puke*", cmdtext, true, 10) == 0)
	{
        new Float:health;
    	GetPlayerHealth(playerid,health);
    	if (health > 100.0)
		{
		    SendClientMessage(playerid,0xFF0000,"Lies you has full health already!");
		    }
		}
		else
		{
		new Float:health;
        GetPlayerHealth(playerid,health);
    	if (health < 99.0)
		{
		    SendClientMessage(playerid,0xFF0000,"There ya go nub");
		    SetPlayerHealth(playerid, 100);
		    GivePlayerMoney(playerid,-1337);
			}
		}
		return 1;
	}
//Edit: Dam u both were faster D=
it wouldn't work because it checks if player health is HIGHER THAN 100, that means if player health is 101 or higher, which is umpossible unless you have godmode. proper code would be
pawn Код:
if (health > 99) return health;
Reply


Messages In This Thread
Noob Question *In Need Of Help ASAP* - by [DBZ]Ali - 20.12.2010, 18:36
Re: Noob Question *In Need Of Help ASAP* - by blackwave - 20.12.2010, 18:41
Respuesta: Noob Question *In Need Of Help ASAP* - by admantis - 20.12.2010, 18:43
AW: Noob Question *In Need Of Help ASAP* - by [SU]Balli - 20.12.2010, 18:51
Respuesta: AW: Noob Question *In Need Of Help ASAP* - by admantis - 20.12.2010, 18:59
Re: Noob Question *In Need Of Help ASAP* - by blackwave - 20.12.2010, 19:01
Re: Noob Question *In Need Of Help ASAP* - by [DBZ]Ali - 21.12.2010, 10:14

Forum Jump:


Users browsing this thread: 1 Guest(s)