07.12.2008, 18:42
pawn Code:
if(strcmp(cmd, "/weatherall", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] < 3)
{
SendClientMessage(playerid, COLOR_GRAD1, " Niste ovlasteni za koristenje ove komande!");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "KORISTENJE: /weatherall [weatherid]");
return 1;
}
new weather;
weather = strvalEx(tmp);
if(weather < 0||weather > 45) { SendClientMessage(playerid, COLOR_GREY, " Weather ID can't be below 0 or above 45!"); return 1; }
SetWeather(weather);
SendClientMessage(playerid, COLOR_GREY, " Weather Set to everyone!");
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, 256, "AdmWarning: %s has changed the weather to %d.", sendername,weather);
ABroadCast(COLOR_YELLOW,string,1);
}
return 1;
}