Код:
if(Player[playerid][viplevel] < 1) return ERRORMSG(playerid);
if(sscanf(params, "d",weather)) return SendClientMessage(playerid,ADMIN_ACTION, "•• Correct syntax is /weather [ weatherid ]");
pawn Код:
CMD:vweather(playerid, params[]) {
new weather, new str[100];
if(Player[playerid][viplevel] < 1) return ERRORMSG(playerid);
if(sscanf(params, "d", weather)) return SendClientMessage(playerid, ADMIN_ACTION, "•• Correct syntax is /vweather [ weatherid ]");
format(str, sizeof(str), "[Success]: You changed the weather to the ID: %d", weather);
SendClientMessage(playerid, -1, str);
SetPlayerWeather(playerid, weather);
return 1;
}
CMD:vtime(playerid, params[]) {
new time, minute, new str[100];
if(Player[playerid][viplevel] < 1) return ERRORMSG(playerid);
if(sscanf(params, "dd", time, minute)) return SendClientMessage(playerid, ADMIN_ACTION, "•• Correct syntax is /vtime[ time ] [ minute ]");
format(str, sizeof(str), "[Success]: You changed the time to: %d hours and %d minutes", time, minute);
SendClientMessage(playerid, -1, str);
SetPlayerTime(playerid, time, minute);
return 1;
}