Azt hiszem sikerült átalakítsam játékos életre
#include <a_samp>
#include <progress>
new Bar:health[MAX_PLAYERS] = {INVALID_BAR_ID, ...};
forward ProgressBar();
public OnFilterScriptInit() {
SetTimer(\"ProgressBar\", 500, 1);
return 1;
}
public OnPlayerSpawn(playerid) {
health[playerid] = CreateProgressBar(548.5, 36.0, _, _, 0x00FF00FF, 1000.0);
ShowProgressBarForPlayer(playerid, health[playerid]);
return 1;
}
public OnPlayerDisconnect(playerid, reason) {
DestroyProgressBar(health[playerid]);
health[playerid] = INVALID_BAR_ID;
return 1;
}
public ProgressBar() {
for(new i; i < MAX_PLAYERS; i++) {
if(health != INVALID_BAR_ID) {
new Float:heal;
GetPlayerHealth(i, heal);
SetProgressBarValue(health, heal);
UpdateProgressBar(health, i);
}
}
}