06.02.2011, 16:45
(
Последний раз редактировалось BlackWolf120; 22.02.2011 в 15:06.
)
hi,
after every round the map changes and so the world time and weather does.
Ive created a random world and weather setter function.
It works but sometimes there seem to be some kind of strange weather/time combinations.(see the attached pics)
You cant see anything then, it does not happen often but its annoying.
Could someone maybe tell me the error in my code causing this bug?
after every round the map changes and so the world time and weather does.
Ive created a random world and weather setter function.
It works but sometimes there seem to be some kind of strange weather/time combinations.(see the attached pics)
You cant see anything then, it does not happen often but its annoying.
Could someone maybe tell me the error in my code causing this bug?
pawn Код:
//random weather ID's
new const RandomWeather[43][1] =
{
{1},{2},{3},{4},{5},{6},{7},{8},{9},{10},{11},{12},{13},{14},{15},{16},{17},{18},{19},{23},{24},{25},
{26},{27},{28},{29},{30},{31},{32},{34},{35},{36},{37},{38},{39},{40},{41},{42},{46},{47},{48},{49},{50}
};
//random world time
new const RandomWorldTime[24][1] =
{
{0},{1},{2},{3},{4},{5},{6},{7},{8},{9},{10},{11},{12},{13},{14},{15},{16},{17},{18},{19},{20},{21},{22},{23}
};
//This is the random setter function
//for weather
new rw = random(sizeof RandomWeather);
SetWeather(RandomWeather[rw][0]);
//for world time
new rwt = random(sizeof RandomWorldTime);
SetWorldTime(RandomWorldTime[rwt][0]);