03.08.2011, 17:36
pawn Код:
COMMAND:changetime(playerid, cmdtext[])
{
new time;
if(!sscanf(cmdtext, "i", time))
{
if(PlayerInfo[playerid][AdminLevel] < 1) return 0;
if(!strlen(time)) return SendClientMessage(playerid, -1, "Usage: /changetime [time]");
if(!IsNumeric(time)) return SendClientMessage(playerid, -1, "Numbers only!");
if(time < 0 || time > 24) return SendClientMessage(playerid, -1, "Wrong time! 0-24");
SetWorldTime(time);
SendClientMessageToAll(-1, "An Admin has changed the time!");
} else return SendClientMessage(playerid, -1, "Usage: /changetime [time]");
return 1;
}
COMMAND:changeweather(playerid, cmdtext[])
{
new weather;
if(!sscanf(cmdtext, "i", weather))
{
if(PlayerInfo[playerid][AdminLevel] < 1) return 0;
if(!strlen(weather)) return SendClientMessage(playerid, -1, "Usage: /changeweather [weatherid]");
if(!IsNumeric(weather)) return SendClientMessage(playerid, -1, "Numbers only!");
SetWeather(weather);
SendClientMessageToAll(-1, "An Admin has changed the weather!");
} else return SendClientMessage(playerid, -1, "Usage: /changeweather [weatherid]");
return 1;
}