/eatcookies
#1

Hey there.
I have a command called /eatcookies.
how can I block it that way, when the player reaches 100 to life, not to be able to eat cookies anymore?
like" your health is now 100! can't eat cookies any more"
the code:
Code edited.
Reply
#2

pawn Код:
if( Health == 100 ) // or if( Health = 100)
{
SendClientMessage( playerid, COLOR_RED, "You've 100 HP, so you can not eat cookies!!!");
return 1;
}
Of cours you can put this instead this above:

pawn Код:
CMD:eatcookies(playerid, params[])
{
    new Float:Health;
    GetPlayerHealth(playerid, Health);
    if( Health > 90.0 )
        return SendClientMessage(playerid, RED, "Your health is more than 90. You can't eat cookies, you'll be too fat !");
        if( Health = 100.0)
            SendClientMessage(playerid, RED, "You've 100 HP, so you can not eat cookies");
         //.. rest of the script
~LetsOWN
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)