GetWeather? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: GetWeather? (
/showthread.php?tid=84107)
GetWeather? -
UsaBoy91 - 28.06.2009
How can i take the Weather ? Is there any function ? Like GetWeather() ?
Re: GetWeather? -
[HiC]TheKiller - 29.06.2009
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?
Re: GetWeather? -
Burridge - 29.06.2009
There isen't
But there is
Re: GetWeather? -
refshal - 29.06.2009
And I guess that you can use this too:
pawn Код:
if(weatherid = THEWEATHERIDYOUWANT);
Re: GetWeather? -
krisk - 29.06.2009
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.
Re: GetWeather? -
International - 29.06.2009
Код:
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
Re: GetWeather? -
refshal - 29.06.2009
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.
Re: GetWeather? -
ledzep - 29.06.2009
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")