25.04.2009, 08:54
For SetWeather:
And replace all the ''SetWeather'' to ''SetWeatherEx'' with the ctrl+h function.
And now you get use ''GetWeather'' everytime you want
For SetPlayerWeather:
And replace all the ''SetPlayerWeather'' to ''SetPlayerWeatherEx'' with the ctrl+h function.
And now you get use ''GetPlayerWeather'' everytime you want
Code:
forward SetWeatherEx(weatherid);
forward GetWeather();
new CurrentWeather;
public SetWeatherEx(weatherid)
{
SetWeather(weatherid);
CurrentWeather = weatherid;
}
public GetWeather()
{
return CurrentWeather;
}
And now you get use ''GetWeather'' everytime you want

For SetPlayerWeather:
Code:
forward SetPlayerWeatherEx(playerid, weatherid);
forward GetPlayerWeather(playerid);
new CurrentWeather[MAX_PLAYERS];
public SetPlayerWeatherEx(playerid, weatherid)
{
SetPlayerWeather(playerid, weatherid);
CurrentWeather[playerid] = weatherid;
}
public GetPlayerWeather(playerid)
{
return CurrentWeather[playerid];
}
And now you get use ''GetPlayerWeather'' everytime you want

