Players health
#1

For my server I want people to have infinite health like /god for that would I do this

Under on player spawn do I just add

SetPlayerHealth(playerid, 9999);
Reply
#2

Ya OnPlayerSpawn

SetPlayerHealth(playerid, 99999);

or do you want a timer that will that will set there health back to 9999 every second?(bad idea though)
Reply
#3

Well I don't care asking as they have infinite health

thx =>
Reply
#4

The maximum health you can set is 100 I think, but you could add SetPlayerHealth(playerid, 100.0) to OnPlayerUpdate
Reply
#5

lol onplayerupdate....

// ongamemodeinit

pawn Код:
SetTimer("HealthRepair", 1000, true);//1 seconds
// Somewhere in your script
pawn Код:
forward HealthRepair();
public HealthRepair()
{
    for(new i=0; i < MAX_PLAYERS; i++)
    {
        SetPlayerHealth(i,1000);
    }
    return 1;
}
Reply
#6

I think I'm gonna use kar thingo he said
Reply
#7

pawn Код:
SetPlayerHealth(playerid, 0x107FFF);
Will give infinite health with the same health bar as full health.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)