GetWeather?
#1

How can i take the Weather ? Is there any function ? Like GetWeather() ?
Reply
#2

I don't think there is a function like that. I think the reasoning behind that is it is pointless. Why do you even need it?
Reply
#3

There isen't
pawn Код:
GetWeather(playerid);
But there is
pawn Код:
SetWeather(weatherid);
Reply
#4

And I guess that you can use this too:

pawn Код:
if(weatherid = THEWEATHERIDYOUWANT);
Reply
#5

Quote:
Originally Posted by [HiC
TheKiller ]
I don't think there is a function like that. I think the reasoning behind that is it is pointless. Why do you even need it?
Weather broadcasts, avoid having the same weather twice in a random weather function? There is some use for it, on the same line as other Get functions, however this one can very easily be made in pawn, either you make a function that's called whenever SetWeather() is called to store the current weather, or you can just store it to a variable wherever you change it.

Note that start weather / default weather is weather ID 1 if I recall correctly, so default value of the variable should be 1.

Quote:
Originally Posted by oh
And I guess that you can use this too:

pawn Код:
if(weatherid = THEWEATHERIDYOUWANT);
That isn't even remotely right in any sense, where did you get the weatherid from? Just randomly making up variables with no relations to the subject, and an IF statement there? and ending an IF statement with a semi-colon? I haven't seen that many errors in one line before.
Reply
#6

Код:
 	if(strcmp(cmdtext, "/weather", true) == 0)
	{
		new Weather; 
		Weather = GetPlayerWeather(weatherid); 
		new string[30]; 
		format(string, 30, "Weather ID $%d", Weather);
		SendClientMessage(playerid, COLOR_WHITE,string);
		return 1;
	}
Lol im unsure how this would be done i think its somehow possible though
Reply
#7

Quote:
Originally Posted by krisk
That isn't even remotely right in any sense, where did you get the weatherid from? Just randomly making up variables with no relations to the subject, and an IF statement there? and ending an IF statement with a semi-colon? I haven't seen that many errors in one line before.
I said that I GUESSED. I don't have Pawno on this Computer. I was not sure.
Reply
#8

There is a rule for weather.

I don't know if it reflects the current weather in the server, but you should be able to retrieve the variable by using:

Код:
new weather = GetServerVarAsInt("weather")
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)