Weather
#1

Hi all.

Ok, So underneath OnGameModeInit i have this:
Код:
SetWeather(08);
and it works when i first spawn, but about five seconds later, the weather goes back to the default clear weather.
Anyone know what i'm doing wrong?
Thanks
-Aston
Reply
#2

Search for SetWeather and delete if u have other one
Reply
#3

Try it under onplayerconnect
Reply
#4

Search for instances of SetPlayerWeather and SetWeather in your scripts. Also, shouldn't it be '8' not 08?
Reply
#5

Default is being overwritten therefore it's something else setting it in your script. Check your timers
Reply
#6

Something like a Time System blocking your Weather Code.

EDIT:
Do you have a Time System or any Weather System Timer code set on your script?
Reply
#7

I have no other systems in my script whatsoever, time, weather, there's nothing.
Reply
#8

Try using setplayerweather when player connects
Reply
#9

Try using this:

Under OnGameModeInIt
pawn Код:
SetTimer("Weather", 5000, true);
This will create a timer, so the weather you want will be set every 5 seconds.

Anywhere In Your Script:
pawn Код:
forward Weather();
public Weather()
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        SetPlayerWeather(i, 8);
    }
    return 1;
}
This will make it so every player will get the same weather, every time the timer is called.
Reply
#10

Quote:
Originally Posted by JJB562
Посмотреть сообщение
Try using this:

Under OnGameModeInIt
pawn Код:
SetTimer("Weather", 5000, true);
This will create a timer, so the weather you want will be set every 5 seconds.

Anywhere In Your Script:
pawn Код:
forward Weather();
public Weather()
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        SetPlayerWeather(i, 8);
    }
    return 1;
}
This will make it so every player will get the same weather, every time the timer is called.
Why do you have to loop? Just do SetWeather and it's fine
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)