SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 03/10/2013, 08:42 PM   #1
AnonScripter
Gangsta
 
Join Date: Sep 2013
Posts: 591
Reputation: 6
Default World Time

how to set the world time in the game to be like (Saturday to Friday) and (00:00 to 23:00)
and make the weather automatically changes that depends on what time is it.. i mean i'll set the weather manually on what X O'clock will change.
AnonScripter is offline   Reply With Quote
Old 03/10/2013, 08:46 PM   #2
Fez
Little Clucker
 
Join Date: Jun 2012
Posts: 17
Reputation: -1
Default Re: World Time

This is what I use for my script.

Code:
public ClockUpdate()
{
	new string[12];
	Second += 1;
	format(string, sizeof(string), "%i:%i:%i", Hour, Minute, Second);
	if(Second == 60)
	{
	    if(Minute == 59)
		{
		    for(new i = 0; i < MAX_PLAYERS; i++)
		    {
		        if(IsPlayerConnected(i))
		        {
					if(Player[i][Faction] == 0)
					{
					    SendClientMessage(i, ORANGE, "Your check is ready to be picked up. Please head to the Job Center to get it.");
					    CheckReady[i] = 1;
					}
					else
					{
						SendClientMessage(i, ORANGE, "Your check is ready to be picked up. Please head to your headquarters to get it.");
						CheckReady[i] = 1;
					}
					}
			}
		    if(Hour == 23)
		    {
		    	Hour = 0;
		    	Minute = 0;
		    	Second = 0;
			}
			else
			{
			    Hour ++;
				Minute = 0;
				Second = 0;
			}
		}
		else
		{
		    Minute ++;
	    	Second = 0;
	 		}
	}
	format(string,sizeof (string),"%02i:%02i:%02i", Hour, Minute, Second);
	TextDrawSetString(Clock, string);
	SetWorldTime(Hour);
	return 1;
}
__________________
Selling Bone County RolePlay [MySQL]
Check it out for yourself. Here is the MySQL files & the AMX http://www.mediafire.com/download/x5...fvgp/BC-RP.rar
Fez is offline   Reply With Quote
Old 03/10/2013, 08:58 PM   #3
AnonScripter
Gangsta
 
Join Date: Sep 2013
Posts: 591
Reputation: 6
Default Re: World Time

would you please explain, there is just minutes and seconds in the game, so what is hours ?
there is just 24 minutes in day in the game
AnonScripter is offline   Reply With Quote
Old 03/10/2013, 09:01 PM   #4
Fez
Little Clucker
 
Join Date: Jun 2012
Posts: 17
Reputation: -1
Default Re: World Time

Quote:
Originally Posted by AnonScripter View Post
would you please explain, there is just minutes and seconds in the game, so what is hours ?
there is just 24 minutes in day in the game
Mine is an RP World Clock. It takes 24 hours IRL time for just one day to pass.

Hit me up on Skype if you would like me to explain in further detail.
Skype: JimmySAMP.
__________________
Selling Bone County RolePlay [MySQL]
Check it out for yourself. Here is the MySQL files & the AMX http://www.mediafire.com/download/x5...fvgp/BC-RP.rar
Fez is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to set player's time same as world time memeli11 Scripting Help 0 02/05/2013 07:35 PM
How can i set world time?? Elmerz_com Help Archive 3 21/11/2010 03:33 PM
[HELP] World time. screw Help Archive 3 02/01/2010 06:46 PM
[HELP]How To set world time. arachimi Help Archive 1 22/12/2009 10:10 PM
keep world time to 00:00 laserhel50 Help Archive 2 11/12/2009 08:09 PM


All times are GMT. The time now is 11:46 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.