Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- ◄ Leonardo Bradoks
- ◄ 07/03/2018 - https://youtu.be/1GeRH5YwAYk
- */
- #include <a_samp>
- #include <dini>
- #define PASTA_CONTAS "Contas/%s.ini"
- new bool:RoletaAtiva[MAX_PLAYERS];
- forward UP();
- forward UPPlayer(playerid); /*-- MOMENTO EM QUE BUGOU MEU CÉREBRO POR NÃO UTILIZAR MAIS FORWARD E SIM FUNCTION --*/
- main()
- {
- print("\n----------------------------------");
- print(" Blank Gamemode by your name here");
- print("----------------------------------\n");
- }
- public OnGameModeInit()
- {
- SetTimer("UP", 60000, true); /*-- SE O UP FOR O MESMO TEMPO PARA TODOS OS PLAYERS --*/
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- SetTimerEx("UPPlayer", 60000, true, "d", playerid); /*-- SE O UP FOR POR TEMPO DIFERENTE DE CADA JOGADOR, POR TEMPO CONECTADO --*/
- return 1;
- }
- public UP() { /*-- SE O UP FOR O MESMO TEMPO PARA TODOS OS PLAYERS --*/
- for(new i = 0; i < GetMaxPlayers(); i++) {
- if(IsPlayerConnected(i)) {
- RoletaAtiva[i] = true;
- SendClientMessage(i, 0x00FF00AA, "[ UP ] Parabéns você acabou de passar por mais um UP, aproveite e tente a sorte use: /roletar");
- }
- }
- return 1;
- }
- public UPPlayer(playerid) { /*-- SE O UP FOR POR TEMPO DIFERENTE DE CADA JOGADOR, POR TEMPO CONECTADO --*/
- if(IsPlayerConnected(playerid)) {
- RoletaAtiva[playerid] = true;
- SendClientMessage(playerid, 0x00FF00AA, "[ UP ] Parabéns você acabou de passar por mais um UP, aproveite e tente a sorte use: /roletar");
- }
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if(strcmp(cmdtext, "/roletar", true) == 0) {
- if(RoletaAtiva[playerid] == false) return SendClientMessage(playerid, -1, "[ ROLETA ] Ainda não está disponível para roletar ! aguarde o próximo UP");
- RoletaAtiva[playerid] = false;
- new file[50], bradoks[MAX_PLAYER_NAME], PremioRandom = random(10);
- GetPlayerName(playerid, bradoks, sizeof(bradoks));
- format(file, sizeof(file), PASTA_CONTAS, bradoks);
- switch(PremioRandom) {
- case 0: {
- SendClientMessage(playerid, -1, "[ ROLETA ] {FF0000}Que pena não foi desta vez !");
- }
- case 1: { /*-- Celular --*/
- dini_IntSet(file, "Celular", 1);
- dini_IntSet(file,"Celoff", 1);
- SendClientMessage(playerid, 0x00FFFFAA, "[ ROLETA ] Parabéns você ganhou um Celular!");
- }
- case 2: { /*-- MP3 --*/
- dini_IntSet(file, "MP3", 1);
- SendClientMessage(playerid, 0x00FFFFAA, "[ ROLETA ] Parabéns você ganhou um MP3!");
- }
- case 3: { /*-- Velocimetro --*/
- dini_IntSet(file,"Velocimetro", 1);
- dini_IntSet(file,"VelocimetroOn", 1);
- SendClientMessage(playerid, 0x00FFFFAA, "[ ROLETA ] Parabéns você ganhou um Velocimetro!");
- }
- case 4: { /*-- GPS --*/
- dini_IntSet(file, "Gps", 1);
- SendClientMessage(playerid, 0x00FFFFAA, "[ ROLETA ] Parabéns você ganhou um GPS!");
- }
- case 5: { /*-- Bloco de Notas --*/
- dini_IntSet(file, "Bloco", 1);
- dini_Set(file, "Lembrete", "Nada");
- SendClientMessage(playerid, 0x00FFFFAA, "[ ROLETA ] Parabéns você ganhou um Bloco de Notas!");
- }
- case 6: { /*-- Capacete --*/
- dini_IntSet(file,"Capacete", 1);
- dini_IntSet(file,"CapaceteOn", 0);
- SendClientMessage(playerid, 0x00FFFFAA, "[ ROLETA ] Parabéns você ganhou um Capacete!");
- }
- case 7: { /*-- Jetpack --*/
- dini_IntSet(file,"jetpack", 1);
- SendClientMessage(playerid, 0x00FFFFAA, "[ ROLETA ] Parabéns você ganhou um JetPack!");
- }
- case 8: { /*-- Sem Parar --*/
- dini_IntSet(file,"semparar", 1);
- SendClientMessage(playerid, 0x00FFFFAA, "[ ROLETA ] Parabéns você ganhou um Sem Parar!");
- }
- case 9: { /*-- Laser --*/
- dini_IntSet(file,"Laser", 1);
- dini_IntSet(file,"LaserOn", 0);
- dini_IntSet(file,"LaserCor", 18643);
- SendClientMessage(playerid, 0x00FFFFAA, "[ ROLETA ] Parabéns você ganhou um Laser!");
- }
- case 10: { /*-- Neon --*/
- dini_IntSet(file,"kitneon", 1);
- SendClientMessage(playerid, 0x00FFFFAA, "[ ROLETA ] Parabéns você ganhou um Kit Neon!");
- }
- }
- return 1;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment