Set Nightmodus?
#1

Hi all!

How can I set the weather to night mode? It would be night then, and EVERYWHERE would be lights!
Reply
#2

Check out this server right now, then u know what i mean!
188.138.45.230:7777
Reply
#3

pawn Код:
SetWorldTime(time);
Place that under OnGameModeInit. 0 = 12am, 1 = 1am, 2 = 2am, etc.

Edit:

Do not post server ip's in this section. It's considered advertising.
Reply
#4

Quote:
Originally Posted by Steven82
Посмотреть сообщение
Do not post server ip's in this section. It's considered advertising.
No it isn't. It was perfectly relevant to the topic of this thread.

But yes setting the time to 0 should work.
Reply
#5

No, I want that it is ONLY nightmodus, so what do I have exactly to add under OnGameModeInIt?
Reply
#6

Ehm, I didnt understand! What add now after
Код:
SetWorldTime(time);
Reply
#7

Not sure if time passes on its own....
pawn Код:
new KeepNight = 1;
OnGameModeInit()
{
    SetNight();
}

forward SetNight();
public SetNight()
{
    SetWorldTime(0);
    if (KeepNight)
    {
        SetTimer("SetNight", 120000, 0);
    }
    return 1;
}
Reply
#8

Lol for what is this?^^

Код:
SetTimer("SetNight", 120000, 0);
the new variable should I add at the top of the script, right?
Reply
#9

Quote:
Originally Posted by Daren_Jacobson
Посмотреть сообщение
No it isn't. It was perfectly relevant to the topic of this thread.

But yes setting the time to 0 should work.
Yes it is. It's pretty much saying, "Hey join this server, so you can check out what i mean." When doing that, it would also be advertising since your having people join the server to see what you mean.
Reply
#10

OMG, 26 Errors, sure that it's under OnGameModeInIt?
Код:
F:\Program Files\Rockstar Games\GTA San Andreas\eigener samp\gamemodes\deathmatch.pwn(37) : error 017: undefined symbol "SetNight"
F:\Program Files\Rockstar Games\GTA San Andreas\eigener samp\gamemodes\deathmatch.pwn(40) : error 029: invalid expression, assumed zero
F:\Program Files\Rockstar Games\GTA San Andreas\eigener samp\gamemodes\deathmatch.pwn(40) : error 017: undefined symbol "SetNight"
F:\Program Files\Rockstar Games\GTA San Andreas\eigener samp\gamemodes\deathmatch.pwn(41) : error 029: invalid expression, assumed zero
F:\Program Files\Rockstar Games\GTA San Andreas\eigener samp\gamemodes\deathmatch.pwn(41) : error 017: undefined symbol "SetNight"
F:\Program Files\Rockstar Games\GTA San Andreas\eigener samp\gamemodes\deathmatch.pwn(68) : warning 225: unreachable code
F:\Program Files\Rockstar Games\GTA San Andreas\eigener samp\gamemodes\deathmatch.pwn(68) : warning 217: loose indentation
F:\Program Files\Rockstar Games\GTA San Andreas\eigener samp\gamemodes\deathmatch.pwn(68) : error 029: invalid expression, assumed zero
F:\Program Files\Rockstar Games\GTA San Andreas\eigener samp\gamemodes\deathmatch.pwn(68) : error 004: function "OnGameModeExit" is not implemented
F:\Program Files\Rockstar Games\GTA San Andreas\eigener samp\gamemodes\deathmatch.pwn(73) : warning 225: unreachable code
F:\Program Files\Rockstar Games\GTA San Andreas\eigener samp\gamemodes\deathmatch.pwn(73) : error 017: undefined symbol "SetPlayerTeamFromClass"
F:\Program Files\Rockstar Games\GTA San Andreas\eigener samp\gamemodes\deathmatch.pwn(75) : error 017: undefined symbol "classid"
F:\Program Files\Rockstar Games\GTA San Andreas\eigener samp\gamemodes\deathmatch.pwn(77) : error 017: undefined symbol "playerid"
F:\Program Files\Rockstar Games\GTA San Andreas\eigener samp\gamemodes\deathmatch.pwn(79) : error 017: undefined symbol "classid"
F:\Program Files\Rockstar Games\GTA San Andreas\eigener samp\gamemodes\deathmatch.pwn(81) : error 017: undefined symbol "playerid"
F:\Program Files\Rockstar Games\GTA San Andreas\eigener samp\gamemodes\deathmatch.pwn(83) : error 017: undefined symbol "classid"
F:\Program Files\Rockstar Games\GTA San Andreas\eigener samp\gamemodes\deathmatch.pwn(85) : error 017: undefined symbol "playerid"
F:\Program Files\Rockstar Games\GTA San Andreas\eigener samp\gamemodes\deathmatch.pwn(89) : error 017: undefined symbol "SetPlayerToTeamColor"
F:\Program Files\Rockstar Games\GTA San Andreas\eigener samp\gamemodes\deathmatch.pwn(91) : error 017: undefined symbol "playerid"
F:\Program Files\Rockstar Games\GTA San Andreas\eigener samp\gamemodes\deathmatch.pwn(93) : error 017: undefined symbol "playerid"
F:\Program Files\Rockstar Games\GTA San Andreas\eigener samp\gamemodes\deathmatch.pwn(95) : error 017: undefined symbol "playerid"
F:\Program Files\Rockstar Games\GTA San Andreas\eigener samp\gamemodes\deathmatch.pwn(97) : error 017: undefined symbol "playerid"
F:\Program Files\Rockstar Games\GTA San Andreas\eigener samp\gamemodes\deathmatch.pwn(99) : error 017: undefined symbol "playerid"
F:\Program Files\Rockstar Games\GTA San Andreas\eigener samp\gamemodes\deathmatch.pwn(101) : error 017: undefined symbol "playerid"
F:\Program Files\Rockstar Games\GTA San Andreas\eigener samp\gamemodes\deathmatch.pwn(105) : error 029: invalid expression, assumed zero
F:\Program Files\Rockstar Games\GTA San Andreas\eigener samp\gamemodes\deathmatch.pwn(105) : error 004: function "OnPlayerRequestClass" is not implemented
F:\Program Files\Rockstar Games\GTA San Andreas\eigener samp\gamemodes\deathmatch.pwn(107) : error 017: undefined symbol "classid"
F:\Program Files\Rockstar Games\GTA San Andreas\eigener samp\gamemodes\deathmatch.pwn(112) : error 017: undefined symbol "SetPlayerTeamFromClass"
F:\Program Files\Rockstar Games\GTA San Andreas\eigener samp\gamemodes\deathmatch.pwn(113) : error 017: undefined symbol "playerid"

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
My OnGameModeInIt includes some other things of myselfe!

Код:
public OnGameModeInit()
{

    {
    SetNight();
	}
	
	forward SetNight();
	public SetNight()
	{
    SetWorldTime(0);
    if (KeepNight)
    {
        SetTimer("SetNight", 120000, 0);
    }
    
    // Don't use these lines if it's a filterscript
    SetGameModeText("***Live your own life as a GangstA***");
    AddPlayerClass(102, 1974.4895,-1157.0608,20.9505,95.6222, 30, 1000, 29, 1000, 27, 1000); //Ballas1
    AddPlayerClass(103, 1976.7120,-1183.5504,26.0188,98.0542, 22, 1000, 34, 1000, 29, 1000); //Ballas2
	AddPlayerClass(104, 2092.0271,-1166.3419,26.5859,89.4869, 28, 1000, 23, 1000, 4, 1000); //Ballas3
	AddPlayerClass(269, 2486.7598,-1647.5186,14.0703,187.5500, 30, 1000, 25, 1000, 24, 1000); //Smoke
    AddPlayerClass(271, 2459.9001,-1688.4135,13.5280,2.9949, 33, 1000, 32, 1000, 31, 1000); //Ryder
    AddPlayerClass(270,2516.3430,-1674.3085,13.9348,81.6422,32,1000,31,1000,34,1000); // Sweet
    AddPlayerClass(0,2495.4890,-1688.2717,13.7022,5.9233,1,0,29,1000,27,1000); // CJ
    AddPlayerClass(105,2451.6484,-1642.4531,13.7357,182.6713,28,1000,33,1000,22,1000); // grove1
    AddPlayerClass(106,2413.7170,-1647.2096,14.0119,174.8622,26,1000,30,1000,23,1000); // grove2
    AddPlayerClass(107,2408.6982,-1674.0126,13.6037,356.5973,34,1000,30,1000,32,1000); // grove3
    AddPlayerClass(108,2571.8352,-1091.2091,66.9639,48.7203,29,1000,9,0,31,1000); // Vagos1
    AddPlayerClass(109,2569.7373,-1088.5804,67.0079,220.8869,22,1000,33,1000,30,1000); // Vagos2
    AddPlayerClass(110,2576.0371,-1070.5568,69.8322,89.5007,27,1000,24,1000,32,1000); // Vagos3
    
	return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)