SA-MP Forums Archive
Problem Gametime! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Problem Gametime! (/showthread.php?tid=256508)



Problem Gametime! - Admigo - 21.05.2011

Heey All,
I have a gametimer:1minute is 1 hour. But when i player spawns the time will be set to -:00. -=Hour.
Here is my timer:
Code:
public TimeWorld(playerid)
{

	if(gameweek == 2)//gametime == 0 && gameday == 1
	{
		 GameTextForAll("~w~The week is almost over~n~~b~changing cities soon", 5000, 0);
		 SendRconCommand("gmx");
	}
	gametime++;
	if(gametime >= 24)
	{
		gametime =0;
	}
	if(gametime == 0)
	{
		gameday ++;
	}
	for(new i=0; i < MAX_PLAYERS; i++)
	{
        	SetPlayerTime(i,gametime,0);
	}
	new string[30];
	SetWorldTime(gametime);
	format(string, sizeof(string), "[GAME TIME] %d:00", gametime);
	SendClientMessageToAll(COLOR_WHITE, string);


OnPlayerSpawn
SetPlayerTime(playerid,gametime,0); I know the 0 needs to be changed but in what?
The day starts at 00.00 not at 12.00 because when i do getplayertime the day begins at 12.00.
Pls help me to fix this or Someone knows a better timer?

Thanks [ACNR]Admigo


Re: Problem Gametime! - Admigo - 21.05.2011

Or i need to make a timer for gameseconds:S


Re: Problem Gametime! - Admigo - 21.05.2011

Nobody have a gametimer that work?