SA-MP Forums

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

 
 
Thread Tools Display Modes
Old 24/02/2010, 05:48 PM   #1
ownboy
Little Clucker
 
Join Date: Apr 2009
Posts: 39
Reputation: 0
Default lvrcr time stand time start on 12:00 go to 12:59 and then go back to 12:00

Hello,

The time Is only 12:00. when it's 12:59 then it go back to 12:00

And I dont see that the Gamedays are changing
They only on Monday.

help please

Code:
new gametime =12;
new gameday =1;

Code:
public TimeWorld()
{
if(gametime == 23 && gameday == 7)

gametime++;
if(gametime >= 24) {
gametime =0;
}
if(gametime == 0 && gameday <= 7) {
gameday ++;
}
for(new i=0; i < MAX_PLAYERS; i++)
{
	if (IsPlayerConnected(i))
  {
    SetPlayerTime(i,gametime,0);
	}

}

new string[30];
SetWorldTime(gametime);
format(string, sizeof(string), "Game Time: %d:00", gametime);
SendClientMessageToAll(0x5F9EA0AA, string);
if(gametime == 0 && gameday == 1) {
SendClientMessageToAll(0x5F9EA0AA,"Game Day: Monday");
}
if(gametime == 0 && gameday == 2) {
SendClientMessageToAll(0x5F9EA0AA,"Game Day: Tuesday");
}
if(gametime == 0 && gameday == 3) {
SendClientMessageToAll(0x5F9EA0AA,"Game Day: Wednesday");
}
if(gametime == 0 && gameday == 4) {
SendClientMessageToAll(0x5F9EA0AA,"Game Day: Thursday");
}
if(gametime == 0 && gameday == 5) {
SendClientMessageToAll(0x5F9EA0AA,"Game Day: Friday");
}
if(gametime == 0 && gameday == 6) {
SendClientMessageToAll(0x5F9EA0AA,"Game Day: Saturday");
}
if(gametime == 0 && gameday == 7) {
SendClientMessageToAll(0x5F9EA0AA,"Game Day: Sunday");
}
if(gametime == 23 && gameday == 7) {
SendClientMessageToAll(0x2587CEAA,"*Game Day: This week is over.");
SendClientMessageToAll(0x2587CEAA,"*AutoAdmin: Don't forget to visit our website at ");
}
}
ownboy is offline  
Old 24/02/2010, 07:44 PM   #2
ownboy
Little Clucker
 
Join Date: Apr 2009
Posts: 39
Reputation: 0
Default Re: lvrcr time stand time start on 12:00 go to 12:59 and then go back to 12:00

Help please ;(
ownboy is offline  
Old 24/02/2010, 07:53 PM   #3
Joe Staff
High-roller
 
Joe Staff's Avatar
 
Join Date: Aug 2007
Posts: 2,797
Reputation: 369
Default Re: lvrcr time stand time start on 12:00 go to 12:59 and then go back to 12:00

Code:
new gDay;
new gHour;
new gMinute;
forward TimeWorld();
public TimeWorld()
{
  gMinute++;
  if(gMinute>59)
  {
    gMinute-=60;
    gHour++;
  }
  if(gHour>23)
  {
    gHour-=24;
    gDay++;
  }
  if(gDay>6)
  {
    gDay-=7; //Beginning of the week would be 0, not 1
  }
}
__________________
Big bottom girls make this rockin' world go 'round.
Joe Staff is offline  
 

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
[FilterScript] [FS] /time For "[FS] Time System (Good for RPG Server)" virspector Filterscripts 4 03/06/2010 03:48 PM
Server going down time to time Cracker Server Support 1 02/09/2009 03:57 PM
Set Time On Gamemode Start Memoryz Help Archive 2 10/08/2009 08:05 PM
Random Team Spawns and Freeze Time when Games Start basker Help Archive 0 15/07/2009 02:33 PM
In game time not match real time speedy199 Help Archive 3 01/04/2009 11:41 AM


All times are GMT. The time now is 01:09 PM.


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