#include <a_samp>
#include <progress>
forward Ehseg(playerid);
new ehseg[MAX_PLAYERS];
new PlayerBar:EhsegBar;
EhsegBar = CreatePlayerProgressBar(playerid, 548.5, 36.0, _, _, 0x00FF00FF, 100.0);
public Ehseg(playerid)
{
ehseg[playerid]--;
SetPlayerProgressBarValue(playerid, EhsegBar, ehseg[playerid]);
UpdatePlayerProgressBar(playerid, EhsegBar);
if(ehseg[playerid] >= 10)
{
SendClientMessage(playerid,0x00ff09AA,\"Ideje enned, ha nem eszel éhen fogsz halni.\");
}
if(ehseg[playerid] == 100)
{
SetPlayerHealth(playerid, 0);
SendClientMessage(playerid,0xff0000AA,\"Éhenhaltál\");
ehseg[playerid] = 100;
}
new string[3];
format(string, sizeof(string),\"%d\", ehseg[playerid]);
return 1;
}
public OnPlayerConnect(playerid)
{
ehseg[playerid] = 100;
SetTimerEx(\"Ehseg\", 3*60000, true, \"i\", playerid);
return 1;
}
így gondoltad?
mert így full rossz :S