02.06.2015, 08:54
Hello, i'm stuck with lotto.
I Already made that the people can buy lotto but i dont know how to make 'public lotto'(?) that rolling every 60minut and give random number, if people have it then he is winner.
I Already made that the people can buy lotto but i dont know how to make 'public lotto'(?) that rolling every 60minut and give random number, if people have it then he is winner.
Код:
COMMAND:ostaloto(playerid, params[]) { new string[128]; new lotonumber; if(PlayerLoggedIn[playerid] == true) { if(!sscanf(params, "i", lotonumber)) { if(lotonumber < 1 || lotonumber > 99) { if(KasutajaInfo[playerid][LotoOlemas] == 0) { if(KasutajaInfo[playerid][Raha] < 150) { KasutajaInfo[playerid][LotoOlemas] = KasutajaInfo[playerid][LotoOlemas] + 1; KasutajaInfo[playerid][LotoNumber] = lotonumber; format(string, sizeof(string), "* Ostsid endale loto numbriga %d *", lotonumber); SCM(playerid, COLOR_WHITE, string); } else SCM(playerid, COLOR_RED, "Sul pole piisavalt raha, vajalik 150$"); } else SCM(playerid, COLOR_RED, "Sul on juba pilet olemas!"); } else SCM(playerid, COLOR_RED, "Pileti number peba olema suurem kui 1 ja vдiksem kui 99"); } else SCM(playerid, COLOR_YELLOW, "KASUTA: /ostaloto [number]"); } else SCM(playerid, COLOR_RED, "Sa pole sisse logitud!"); return 1; }