#include a_samp#include zcmdnew ehseg[MAX_PLAYERS];forward Ehseg(playerid);public OnPlayerConnect(playerid){ehseg[playerid] = 0;SetTimerEx(\"Ehseg\", 3*60000, true, \"i\", playerid);return 1;} public Ehseg(playerid){ ehseg[playerid]++;if(ehseg[playerid] >= 90) return SendClientMessage(playerid,0x00ff09AA,\"Ideje enned, ha nem eszel éhen fogsz halni.\");if(ehseg[playerid] == 100) return SetPlayerHealth(playerid, 0), SendClientMessage(playerid,0xff0000AA,\"Éhenhaltál\"), ehseg[playerid] = 0;new string[3];format(string, sizeof(string),\"%d\", ehseg[playerid]);return 1;}CMD:eves(playerid, params[]){ehseg[playerid] = 0;GivePlayerMoney(playerid, -100);SendClientMessage(playerid,0x00ff09AA,\"Ettél egy szendvicset.\");return 1;}
new PlayerBar:EhsegBar;EhsegBar = CreatePlayerProgressBar(playerid, x, y, hossz, magasság, maxérték);
ehseg[playerid]--;SetPlayerProgressBarValue(playerid, EhsegBar, ehseg[playerid]);UpdatePlayerProgressBar(playerid, EhsegBar);
ehseg[playerid] = 100;SetPlayerProgressBarValue(playerid, EhsegBar, ehseg[playerid]);UpdatePlayerProgressBar(playerid, EhsegBar);
#include <a_samp>#include <progress>forward Ehseg(playerid);new ehseg[MAX_PLAYERS],PlayerBar:EhsegBar;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);EhsegBar = CreatePlayerProgressBar(playerid, 548.5, 36.0, 102.5, 9.0, 0x00FF00FF, 100.0);return 1;}public OnPlayerSpawn(playerid){ShowPlayerProgressBar(playerid, EhsegBar);return 1;}public OnPlayerDeath(playerid, killerid, reason){HidePlayerProgressBar(playerid, EhsegBar);return 1;}