28.06.2014, 14:10
Could someone convert this to zcmd? (Not sure if it's zcmd or what.. it should be like command:weather(playerid,params)
Please.
Please.
Code:
dcmd_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; } dcmd_weather(playerid, params[]) return dcmd_w(playerid, params); dcmd_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; } dcmd_time(playerid, params[]) return dcmd_t(playerid, params);