Jump to content

Question

Posted

[pawn]public settime(playerid)

{

    //News

new string[256],year,month,day;

new ServerHour, ServerMinute, ServerSecond;

    //Get

gettime(ServerHour,ServerMinute,ServerSecond);

getdate(year, month, day);

for(new i = 0; i < GetMaxPlayers(); i++){SetPlayerTime(i, ServerHour, ServerMinute);}

if(ServerHour == 19 && ServerMinute == 50 && ServerSecond == 1)

{

    SendClientMessageToAll(COLOR_WHITE, "  In 5 minute se va verifica si se va declara castigatorul la Lotto");

        SendClientMessageToAll(COLOR_WHITE, "  Foloseste si tu /lotto [numar] , poate vei castiga");

}

else if(ServerHour == 19 && ServerMinute == 52 && ServerSecond == 0)

{

    new rand = random(80);

    if(rand < 77) { rand += 3; }

      Lotto(rand);

}

format(string, sizeof string, "~w~%d/~w~%s%d/~w~%s%d", day, ((month < 10) ? ("0") : ("")), month, (year < 10) ? ("0") : (""), year);

TextDrawSetString(Date, string);

format(string, sizeof string, "~w~%s%d:~w~%s%d:~w~%s%d", (ServerHour < 10) ? ("0") : (""), ServerHour, (ServerMinute < 10) ? ("0") : (""), ServerMinute, (ServerSecond < 10) ? ("0") : (""), ServerSecond);

TextDrawSetString(Time2, string);

}[/pawn]

09e9a7e375e5dc2c5082d9d4089e34d6.png

Ce am gresit ? de ce apare de 2 ori !?

1 answer to this question

Recommended Posts

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.