28.10.2014, 12:24
Can somebody please tell me what is wrong with this, it should be 100% in textdraw
OnPlayerSpawn
Server Load
Hungry Timer
OnPlayerUpdate
format(str2, sizeof(str), "Hunger: %d%", CurHealth[playerid]);
TextDrawSetString(PHunger[playerid], str2);
it shows textdraw but it's 0% not 100
OnPlayerSpawn
Code:
if(ServerLoading[playerid] == 1) { SetTimerEx("ServerLoad", 7000, false, "d", playerid); SetTimerEx("Hungry", 600000, 1, "i", playerid); SCM(playerid, WHITE, "Server loading, please wait..."); }
Code:
public ServerLoad(playerid) { ServerLoading[playerid] = 0; SetCameraBehindPlayer(playerid); TogglePlayerControllable(playerid, 1); SCM(playerid, WHITE, "Server loaded..."); return 1; }
Code:
public Hungry(playerid) { new Float:helt; GetPlayerHealth(playerid, helt); if(CurHealth[playerid] >= helt) { SCM(playerid, WHITE, "You're hungry, you should eat."); SetPlayerHealth(playerid, helt-5); CurHealth[playerid] = helt; } else { CurHealth[playerid] = helt; } }
format(str2, sizeof(str), "Hunger: %d%", CurHealth[playerid]);
TextDrawSetString(PHunger[playerid], str2);
it shows textdraw but it's 0% not 100