28.06.2014, 14:21
pawn Code:
CMD:w(playerid, params[]) {
new idx, iString[128];
iString = strtok(params, idx);
if (!strlen(iString)) {
SendClientMessage(playerid, 0xFFFFFFFF, "[USAGE]: /w [ID] or /weather [ID]");
return true;
}
idx = strval(iString);
if (idx < MIN_WEAT_ID || idx > MAX_WEAT_ID) {
SendClientMessage(playerid, 0xFFFFFFFF, "{0xFF4040FF}[ERROR]{0xFFFFFFFF}: Invalid WEATHERID");
return true;
}
SetPlayerWeather(playerid, idx);
format(iString, 128, "Weather changed to %d", idx);
SendClientMessage(playerid, 0xFFFFFFFF, iString);
return true;
}
CMD:weather(playerid, params[]) {
new idx, iString[128];
iString = strtok(params, idx);
if (!strlen(iString)) {
SendClientMessage(playerid, 0xFFFFFFFF, "[USAGE]: /w [ID] or /weather [ID]");
return true;
}
idx = strval(iString);
if (idx < MIN_WEAT_ID || idx > MAX_WEAT_ID) {
SendClientMessage(playerid, 0xFFFFFFFF, "{0xFF4040FF}[ERROR]{0xFFFFFFFF}: Invalid WEATHERID");
return true;
}
SetPlayerWeather(playerid, idx);
format(iString, 128, "Weather changed to %d", idx);
SendClientMessage(playerid, 0xFFFFFFFF, iString);
return true;
}
CMD:t(playerid, params[]) {
new idx, iString[128];
iString = strtok(params, idx);
if (!strlen(iString)) {
SendClientMessage(playerid, 0xFFFFFFFF, "[USAGE]: /t [NUM] or /time [NUM]");
return true;
}
idx = strval(iString);
if (idx < MIN_TIME_ID || idx > MAX_TIME_ID) {
SendClientMessage(playerid, 0xFFFFFFFF, "{0xFF4040FF}[ERROR]{0xFFFFFFFF} Invalid HOUR");
return true;
}
SetPlayerTime(playerid, idx, 0)
format(iString, 128, "Time changed to %d", idx);
SendClientMessage(playerid, 0xFFFFFFFF, iString);
return true;
}
CMD:time(playerid, params[]) {
new idx, iString[128];
iString = strtok(params, idx);
if (!strlen(iString)) {
SendClientMessage(playerid, 0xFFFFFFFF, "[USAGE]: /t [NUM] or /time [NUM]");
return true;
}
idx = strval(iString);
if (idx < MIN_TIME_ID || idx > MAX_TIME_ID) {
SendClientMessage(playerid, 0xFFFFFFFF, "{0xFF4040FF}[ERROR]{0xFFFFFFFF} Invalid HOUR");
return true;
}
SetPlayerTime(playerid, idx, 0)
format(iString, 128, "Time changed to %d", idx);
SendClientMessage(playerid, 0xFFFFFFFF, iString);
return true;
}