Weather control..
#1

Hello everyone, I am wondering, how can I create a CMD, to control the weather. (IDS, and time.)
I am sort of new to scripting, and this is an unknown area for me.
Thanks in advance.
Reply
#2

This is taken directly from script.

pawn Код:
CMD:setweather(playerid,params[])
    {
        new string[128];
        new sendername[MAX_PLAYER_NAME];
        new weather;
        if(sscanf(params, "d", weather))
        return SendClientMessage(playerid, RED, "/setweather [Weather ID]");
        if(PlayerInfo[playerid][pAdmin] < 4)
        return SendClientMessage(playerid, RED, "You are not high admin enough");
        {
            SetWeather(weather);
            SendClientMessage(playerid, RED, "The weather has been changed");
            GetPlayerName(playerid, sendername, sizeof(sendername));
            format(string, 256, "[ADMIN] %s has changed the weather to %d.", sendername,weather);
            aMessage(COLOR_YELLOW,string,1);
        }
        return 1;
    }
Just as an example
Reply
#3

Quote:
Originally Posted by RedWolfX
Посмотреть сообщение
This is taken directly from script.

pawn Код:
CMD:setweather(playerid,params[])
    {
        new string[128];
        new sendername[MAX_PLAYER_NAME];
        new weather;
        if(sscanf(params, "d", weather))
        return SendClientMessage(playerid, RED, "/setweather [Weather ID]");
        if(PlayerInfo[playerid][pAdmin] < 4)
        return SendClientMessage(playerid, RED, "You are not high admin enough");
        {
            SetWeather(weather);
            SendClientMessage(playerid, RED, "The weather has been changed");
            GetPlayerName(playerid, sendername, sizeof(sendername));
            format(string, 256, "[ADMIN] %s has changed the weather to %d.", sendername,weather);
            aMessage(COLOR_YELLOW,string,1);
        }
        return 1;
    }
Just as an example
Ow, I see, well that makes things a bit more clear. Thank you.
It's always awsome to learn new stuff
Reply
#4

No problem Are you using strcmp or zcmd or any other command proccesor?
I can help you create a cmd
Reply
#5

Quote:
Originally Posted by RedWolfX
Посмотреть сообщение
No problem Are you using strcmp or zcmd or any other command proccesor?
I can help you create a cmd
I am using ZCMD, and as I said, I am new to scripting.
It's my first week, but am getting the catch of things pretty much fast, if you could teach me anything, that'll be great.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)