Quote:
Originally Posted by Naleksuh
hello, i'm try to find way to set player health without problems. Previous i was using
PHP Code:
SetEntityHealth(client, number);
but this has problems that it say it's not valid entity, even if client i give it is right. Is there better approach to this? it's the only thing i've been able to find in searches
|
You probably just need to check if the client is a valid index, is in-game, and is alive.
PHP Code:
if (0 < client <= MaxClients && IsClientInGame(client) && IsPlayerAlive(client))
{
SetEntityHealth(client, number);
}
__________________