27.05.2014, 23:10
I have 3 total timers on my server and ever since the recent addition of a timer for the weather, Everything else has been screwed up.
Here are the first timers i added:
Here is what i recently added which SEEMED to cause all of the problems:
also is 24 the max world time?
Thank You
Here are the first timers i added:
Код:
public OnPlayerSpawn(playerid) { SetTimerEx("LooseHunger", 150000, true, "i", playerid); } public LooseHunger(playerid) { if(PlayerInfo[playerid][Hunger] == 0 || PlayerInfo[playerid][Hunger] < 0) { SetTimerEx("LooseHealth", 6000, false, "i", playerid); if(PlayerInfo[playerid][Hunger] < 0) { PlayerInfo[playerid][Hunger] = 0; } } else { UpdateDodHunger(playerid, -5); PlayerPlaySound(playerid, 1190, 0.0, 0.0, 0.0); } return 1; } public LooseHealth(playerid) { new Float:health; GetPlayerHealth(playerid,health); if(PlayerInfo[playerid][Hunger] < 1) { SetTimerEx("LoseHealth", 6000, false, "i", playerid); SetPlayerHealth(playerid, health - 10); PlayerPlaySound(playerid, 1095, 0.0, 0.0, 0.0); if(health < 0) { SetPlayerHealth(playerid, 0); } } return 1; }
Код:
public OnGameModeInit() { /// World Time(Day/Night) WorldTime = 12; SetWorldTime(12); print("Starting Day/Night Timer"); SetTimer("WorldTimer", 60000, true); } public WorldTimer() { if(WorldTime == 25) { WorldTime = 0; } else { WorldTime += 1; } SetWorldTime(WorldTime); return 1; }
Thank You