Setting weather for a player?
#1

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...
Reply
#2

https://sampwiki.blast.hk/wiki/SetPlayerWeather
Reply
#3

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;
    }
Reply
#4

How do I set it up as soon as a player joins the server their weather changes to [weatherid:32]?
Reply
#5

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;
}
Reply
#6

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
Reply
#7

Don't start flaming, I was like him to.. lol
Reply
#8

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)