How to get the lowest health of the player?
Well, let's just say i'm not advanced coder but I'm understood some coding experiences. I want to find player which has a lowest health. Drop comments to help me out.
ty. |
Re: How to get the lowest health of the player?
It's always 1 as the lowest health a player can have being alone very and 0 the lowest possible which kills the player
|
Re: How to get the lowest health of the player?
Quote:
|
Re: How to get the lowest health of the player?
I mean which player has a lowest health like for example:
Player 1: has 100% Player 2: has 45% Player 3: has 76% Player 4: has 48% Player 3 has a lowest health so i want to put like if(playerhasalowesthealth(client)) { (Do something) } Hope you what i mean. |
Re: How to get the lowest health of the player?
Keep in mind this code will return only one client, i also suppose max health is 100HP, so i putted 101 in min.
PHP Code:
PHP Code:
|
Re: How to get the lowest health of the player?
Bool function on new syntax, since you need to iterate through every client, I guess the earlier return point could help a bit(?)
Code:
public bool playerHasLowestHealth(int client) |
Re: How to get the lowest health of the player?
Quote:
Quote:
|
Re: How to get the lowest health of the player?
Quote:
also isclientconnected it's useless when you check if the client is in game. PHP Code:
|
Re: How to get the lowest health of the player?
Quote:
|
Re: How to get the lowest health of the player?
Quote:
|
All times are GMT -4. The time now is 19:04. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.