/* FULLY spaces Theft Credit or Publication of this filterscript without my permission. EASY FILTERSCRIPT --> Easy Lottery System BASE CREDITOS: OTACON ;) NOTA: Menos Creditos para los que me los critican.. JO'PUTAS! :D xD ;) */ // ========== [ -|- FUNCTION -|- ] ========== #include #include #include #define ID_LOTERIA (1) //The id of the menu of the lottery. #define VALOR_TICKET (500) //The value of the ticket. #define TIEMPO_LOTERIA (30) //cada 30 Minutos sorteara. #define PREMIO_INICIAL (100) //initial well lottery is multiplied according to the number of ticket's sold. #define POZO_LIMITE (200) //the limit for the initial well will return. new NumeroLoteria[MAX_PLAYERS]; new PozoLoteria=PREMIO_INICIAL; new bool:TicketLoteria[MAX_PLAYERS]=false; new MatarLoteria; new PozoLoteriaLimite=0; public OnFilterScriptInit() { MatarLoteria=SetTimer("Lottery", TIEMPO_LOTERIA*60000, true); return true; } public OnFilterScriptExit() { KillTimer(MatarLoteria); return true; } COMMAND:ticket(playerid, params[]) { ShowPlayerDialog(playerid,ID_LOTERIA+0, DIALOG_STYLE_INPUT, "Easy Lottery System BASE", "Enter a number between 0 and 100:", "Buy "," Exit "); return true; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){ new str[128]; switch(dialogid) { case ID_LOTERIA+0: { if(response) { if(sscanf(inputtext, "d", inputtext[0])) return ShowPlayerDialog(playerid,ID_LOTERIA+0, DIALOG_STYLE_INPUT, "Easy Lottery System BASE", "Enter a number between 0 and 100: \nNumeric value is permitted", "Buy "," Exit "); if(inputtext[0]<0 || inputtext[0]>100) return ShowPlayerDialog(playerid,ID_LOTERIA+0, DIALOG_STYLE_INPUT, "Easy Lottery System BASE", "Enter a number between 0 and 100: \nnot go below 0 or above 100", "Buy "," Exit "); if(TicketLoteria[playerid]==true) return ShowPlayerDialog(playerid,ID_LOTERIA+0, DIALOG_STYLE_INPUT, "Easy Lottery System BASE", "Enter a number between 0 and 100: \nalready bought a ticket", "Buy "," Exit "); if(GetPlayerMoney(playerid) Easy Lottery System BASE CREDITOS: OTACON ;) NOTA: Menos Creditos para los que me los critican.. JO'PUTAS! :D xD ;) */