Setting weather for a player? - 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: Setting weather for a player? (
/showthread.php?tid=139853)
Setting weather for a player? -
Freddy Z - 06.04.2010
Is there a command to set a static weather for a (one) player?
So when a player teleports somewhere the weather will make it look like another planet or whatever...
Re: Setting weather for a player? -
dice7 - 06.04.2010
https://sampwiki.blast.hk/wiki/SetPlayerWeather
Re: Setting weather for a player? -
FujiNNN - 06.04.2010
pawn Код:
if(strcmp(cmd, "/weather", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] < 1337)
{
SendClientMessage(playerid, COLOR_GRAD1, "* you are not authorized to use that command!");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /weather [weatherid]");
return 1;
}
new weatherset;
weather = strval(tmp);
if(weatherset < 0||weatherset > 45) { SendClientMessage(playerid, COLOR_GREY, "* Weather ID can't be below 0 or above 45!"); return 1; }
SetPlayerWeather(playerid, weatherset);
SendClientMessage(playerid, COLOR_GREY, "* Weather Set!");
}
return 1;
}
if(strcmp(cmd, "/weatherall", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] < 1337)
{
SendClientMessage(playerid, COLOR_GRAD1, "* you are not authorized to use that command!");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /weatherall [weatherid]");
return 1;
}
new weatherset;
weatherset = strval(tmp);
if(weatherset < 0||weatherset > 45) { SendClientMessage(playerid, COLOR_GREY, "* Weather ID can't be below 0 or above 45!"); return 1; }
SetWeather(weatherset);
SendClientMessage(playerid, COLOR_GREY, "* Weather Set to everyone!");
}
return 1;
}
Re: Setting weather for a player? -
Ozwell_Spencer - 05.06.2010
How do I set it up as soon as a player joins the server their weather changes to [weatherid:32]?
Re: Setting weather for a player? -
LTomi - 05.06.2010
Quote:
Originally Posted by Ozwell_Spencer
How do I set it up as soon as a player joins the server their weather changes to [weatherid:32]?
|
pawn Код:
public OnPlayerConnect(playerid)
{
SetPlayerWeather(playerid, 32);
return 1;
}
Re: Setting weather for a player? -
Flashy - 05.06.2010
How you can do that on your own?
Learn to fucking script.
https://sampwiki.blast.hk/wiki/Main_Page
https://sampwiki.blast.hk/wiki/Category:Tutorials
Re: Setting weather for a player? -
iStarzz - 05.06.2010
Don't start flaming, I was like him to.. lol
Re: Setting weather for a player? -
Flashy - 05.06.2010
Oh, sry when somebody thinks I am starting flaming

I just use "fucking" cause it is much better to learn it by himself then ask.
I donґt want to flame