20.09.2012, 13:51
Well.. I got this idea about weather changing every hour and I tried to realize it... The code compiles correctly, but it doesn't give me wanted results. Here is what I get ._. :
Код:
#include <a_samp> // I use more includes, but only this one is need now ._. public OnGameModeInit() { SetTimer("weather", 10000, 1); // I did say hour, but I put 10s for testing return 1; } public weather(playerid, weatherid) { new wstr[40]; if(weatherid < 0 || weatherid > 45) return weather(playerid, weatherid); format(wstr, sizeof(wstr), "The weather has been changed to %i!", weatherid); SendClientMessageToAll(0xAA0000AA, wstr); SetPlayerWeather(playerid, weatherid); return 1; }