help cmd
#3

What error?

Try this for weather :
Код:
	if(strcmp(cmd, "/weather", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	        if(PlayerInfo[playerid][AdmLvl] < 2)
			{
			    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 weather;
			weather = strval(tmp);
			if(weather < 0||weather > 45) { SendClientMessage(playerid, COLOR_GREY, "   Weather ID can't be below 0 or above 45!"); return 1; }
			SetWeather(weather);
			DefaultWeather = weather;
		}
		return 1;
	}
EDIT: Wrong in [AdmLvl] but now fixed...
Reply


Messages In This Thread
help cmd - by 26_RUSSS - 26.07.2012, 00:39
Re: help cmd - by 26_RUSSS - 26.07.2012, 01:11
Re: help cmd - by McCurdy - 26.07.2012, 05:46
Re: help cmd - by maramizo - 26.07.2012, 05:52
Re: help cmd - by McCurdy - 26.07.2012, 06:14

Forum Jump:


Users browsing this thread: 1 Guest(s)