10.02.2018, 21:28
If you want it only for the playerid:
PHP код:
CMD:changemyweather(playerid, params[])
{
new weather, string[128];
if(sscanf(params, "i", weather)) return SendClientMessage(playerid, 0xf8f8f8fff, "Syntax: {f00f00}/changemyweather <0 - 45>");
if(weather < 0 || weather > 45) return SendClientMessage(playerid, 0xf8f8f8fff, "ERROR: {FFFFFF}Invalid Weather! <0 - 45>");
SetPlayerWeather(playerid, weather);
format(string, sizeof(string), "{ff0ff0}Your Weather has changed to Weather %d!",weather);
SendClientMessage(playerid, 0xf8f8f8fff, string);
return 1;
}
CMD:changemytime(playerid, params[])
{
new timee, string[128];
if(sscanf(params, "i", timee)) return SendClientMessage(playerid, 0xf8f8f8fff, "Syntax: {f00f00}/changemytime <0 - 23>");
if(timee < 0 || timee > 23) return SendClientMessage(playerid, 0xf8f8f8fff, "ERROR: {FFFFFF}Invalid Time <0 - 23>.");
format(string, sizeof(string), "{ff0ff0}Your time has changed to %d!",timee);
SendClientMessage(playerid, 0xf8f8f8fff, string);
SetPlayerTime(playerid, timee, 0);
return 1;
}