24.02.2010, 16:48
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
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
pawn Code:
new gametime =12;
new gameday =1;
pawn 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 ");
}
}