Question about SetWeather
#1

Let's say there's 2 players online, if I use SetWeather the weather changes for the two players, right?
But if more players connect will their weather be set to the same ID that has been used in SetWeather?
Or do I have to use SetPlayerWeather everytime someone connects?
Reply
#2

Easy; just do:

pawn Код:
new Weather;

forward WeatherChange();

public OnGameModeInit()
{
    Weather = 1;
    SetWeather(Weather);
    SetTimer("WeatherChange", 30000, 1);//Every 30 seconds
    return 1;
}

public WeatherChange()
{
    new rand = 0 + random(17);
    Weather = rand;
    SetWeather(Weather);
    return 1;
}

public OnPlayerConnect(playerid)
{
    SetPlayerWeather(playerid, Weather);
    return 1;
}
There you go, that's making it all good.
Reply
#3

Thanks.
Reply
#4

Pff. If you want it to be the same for everybody...Just use SetWeater(weatherid);
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)