Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

Time Problem

$
0
0
Hi, I'm doing an alarm system. But in some places I get confused. I want you to set the time that other days want when the year is up. Month, Day is valid. Thanks in advance for your help.

Code:

        getdate(tmp_nDate[0], tmp_nDate[1], tmp_nDate[2]);
        gettime(tmp_nDate[3], tmp_nDate[4], tmp_nDate[5]);
        if(sscanf(params, "ddddds[100]", nDate[0], nDate[1], nDate[2], nDate[3], nDate[4], nNote)) return SendClientMessage(playerid, -1, "{3498db}Usage: {FFFFFF}/SetAlarm [Year] [Moon] [Day] [Hour] [Minute] [Note]");
        if(nDate[0] < tmp_nDate[0]) return SendClientMessage(playerid, -1, "{e74c3c}Alarm: {FFFFFF}Enter a value above the current year.");
    if(nDate[1] < tmp_nDate[1] || nDate[1] > 12) return SendClientMessage(playerid, -1, "{e74c3c}Alarm: {FFFFFF}Enter the current month time.");
        if(nDate[2] < tmp_nDate[2] || nDate[2] > ayCek()) return SendClientMessage(playerid, -1, "{e74c3c}Alarm: {FFFFFF}Enter the current number of days.");
        if(nDate[3] < tmp_nDate[3] || nDate[3] > 23) return SendClientMessage(playerid, -1, "{e74c3c}Alarm: {FFFFFF}Enter the current clock time.");
    if(nDate[3]-1 < tmp_nDate[3]){if(nDate[4] <= tmp_nDate[4]){
        SendClientMessage(playerid, -1, "{e74c3c}Alarm: {FFFFFF}Enter the current minute.");
        return 1;}}
        if(nDate[4] > 59) return SendClientMessage(playerid, -1, "{e74c3c}Alarm: {FFFFFF}Enter the current minute.");


Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>