-
Notifications
You must be signed in to change notification settings - Fork 13
HealthBars
KissLick edited this page May 27, 2016
·
7 revisions
TeamGames provides simple API for adding HealthBars to players. Each player can only have one HealthBar at the time and if there is some health change that TG core can't recognize, you have to update the HealthBar via TG_UpdatePlayerHealthBar
.
So, we have three different natives for HealthBars.
public TG_OnGameStart(const String:id[], TG_GameType:gameType, client, const String:gameSettings[], Handle:dataPack)
{
if (!StrEqual(id, GAME_ID))
return;
for (new i = 1; i <= MaxClients; i++) {
if (!TG_IsPlayerRedOrBlue(i))
continue;
SetEntityHealth(i, 500);
// Add HealthBar and adjust it to 500HP
TG_AttachPlayerHealthBar(i, 500);
}
}
- Installation guide
- Teams
- Games
- Marks
- Fences
- Commands
- Bind actions
- TG menu & Modules config
- Chat & ColorVariables config
- Downloads config
- Logs
- Modules
- How does it work
- Api site
- Commented examples
- Module templates
- How To's