Posts: 265
Threads: 59
Joined: Sep 2013
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.
Posts: 265
Threads: 59
Joined: Sep 2013
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
Posts: 265
Threads: 59
Joined: Sep 2013
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.