How can i make when player still have only 10 hp to say hi :)?
#1

I need a example to do this:
When player have 10 hp to say HI ( Sendclientmessage) ... only that give me example where to put when have 10 hp to do something
Reply
#2

https://sampwiki.blast.hk/wiki/OnPlayerTakeDamage
https://sampwiki.blast.hk/wiki/GetPlayerHealth
https://sampwiki.blast.hk/wiki/Scripting_Basics#Variables
Reply
#3

pawn Код:
public OnPlayerUpdate(playerid)
{
    new Float:health;
    GetPlayerHealth(playerid,health);
    if (health < 10.0)
    {
        SendClientMessage(playerid, COLOR_RED, "Hi."); //Sending the message
        SetPlayerHealth(playerid, 11); //Setting hp to 11 so it wont spam him with the message
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)