convert dcmd to zcmd..
#4

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;
}
+rep me if I helped.
Reply


Messages In This Thread
convert dcmd to zcmd.. - by Steezy_ - 28.06.2014, 14:10
Re: convert dcmd to zcmd.. - by BroZeus - 28.06.2014, 14:18
Re: convert dcmd to zcmd.. - by Stinged - 28.06.2014, 14:20
Re: convert dcmd to zcmd.. - by iSkate - 28.06.2014, 14:21
Re: convert dcmd to zcmd.. - by Steezy_ - 28.06.2014, 14:34
Re : convert dcmd to zcmd.. - by Clad - 28.06.2014, 14:47
Re: convert dcmd to zcmd.. - by sammp - 28.06.2014, 15:10
Re: convert dcmd to zcmd.. - by AroseKhanNiazi - 28.06.2014, 17:19

Forum Jump:


Users browsing this thread: 1 Guest(s)