convert dcmd to zcmd..
#1

Could someone convert this to zcmd? (Not sure if it's zcmd or what.. it should be like command:weather(playerid,params)
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);
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)