08.09.2016, 18:50
Hello, i tried to make a automatic weather system that change the weather for everyone.
This should change every 12 seconds (Testing, will change it later), But it's actually not working at all.
Don't worry the "WeatherOnPlayerConnect" is defined in OnPlayerConnect.
Can somebody give me some tips and help me out?
Код:
WeatherOnPlayerConnect(playerid) { SetTimerEx("RandomWeather", 12000, false, "i", playerid); } forward RandomWeather(); public RandomWeather() { new weather; weather = random(20); foreach(Player, i) { SetPlayerWeather(i,weather); } }
Don't worry the "WeatherOnPlayerConnect" is defined in OnPlayerConnect.
Код:
public OnPlayerConnect(playerid) { WeatherOnPlayerConnect(playerid); return 0; }