Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(strcmp(cmd, "/qderby", true) == 0)
- {
- if(pAdmin[playerid] >= 1)// tua variavel de admin 1 = nivel de adm que poder abrir >= maior ou igual a nivel 1
- {
- return SenClientMessage(-1,playerid, voce nao è um administrador);//aviso para o player que tento o comando
- if(qderbyplaying == 1)
- {
- SendClientMessage(playerid, 0xB4B5B7AA, "O derby já começou");
- return 1;
- }
- if(playerinminigame[playerid] == 1)
- {
- SendClientMessage(playerid, 0xB4B5B7AA, "Voce já esta em um minigame");
- return 1;
- }
- new pname[256];
- GetPlayerName(playerid, pname, 256);
- if(qderbyon == 0)
- {
- Respawnqbloodrings();
- qderbyon = 1;
- playerinminigame[playerid] = 1;
- playerinqderby[playerid] = 1;
- qderbyrank = 1;
- SetPlayerInterior(playerid,0);
- SetPlayerVirtualWorld(playerid,7);
- SetVehicleVirtualWorld(qbloodring[0],7);
- qbloodringfull[0] = 1;
- PutPlayerInVehicle(playerid, qbloodring[0], 0);
- playerinqbloodring[playerid] = 0;
- TogglePlayerControllable(playerid, 0);
- startvar[3] = 1;
- qdtimer = SetTimer("StartqDerby", 60000, 0);
- format(string, sizeof(string), "%s iniciou um derby pedreira, você tem um minuto para digitar, /qderby e juntar-se", pname);//
- SendClientMessageToAll(0x33AA33AA,string);
- return 1;
- } else if(qderbyon == 1 && qderbyrank < 15) {
- playerinminigame[playerid] = 1;
- playerinqderby[playerid] = 1;
- qderbyrank++;
- SetPlayerInterior(playerid,0);
- for(new i=0; i<15; i++)
- {
- if(qbloodringfull[i] == 0)
- {
- SetPlayerVirtualWorld(playerid,7);
- SetVehicleVirtualWorld(qbloodring[i],7);
- qbloodringfull[i] = 1;
- PutPlayerInVehicle(playerid, qbloodring[i], 0);
- TogglePlayerControllable(playerid, 0);
- playerinqbloodring[playerid] = i;
- format(string, sizeof(string), "%s foi ao derby pedreira", pname);//
- SendClientMessageToAll(0x33AA33AA,string);
- return 1;
- }
- }
- } else if(qderbyon == 1 && qderbyrank >= 15) {
- format(string, sizeof(string), "O derby pedreira está cheio, espere a próxima rodada", pname);//
- SendClientMessage(playerid,0x33AA33AA,string);
- }// chave fechada da variavel adm
- return 1;
- }
- }
- CMD:abrigame(playerid)
- {
- if(pAdmin[playerid] >= 1) return SendClientMessage(playerid,0xFF0000,"Erro: Você não tem permissão para usar este comando.");
- if(eventogame == 1) return SendClientMessage(playerid, 0xFF0000,"ERRO: o minigame ja esta Aberto");
- eventogame = 1;
- SendClientMessageToAll(0x228B22FF , "[INFO] o minigamefoi aberto!");
- SendClientMessage(playerid, -1, "|| ATENÇÃO ADM! Feche o Evento com /fecharminigame");
- return 1;}
- CMD:fechargame(playerid)
- {
- if(pAdmin[playerid] >= 1) return SendClientMessage(playerid,0xFF0000,"Erro: Você não tem permissão para usar este comando.");
- if(eventogame == 0) return SendClientMessage(playerid,0xFF0000,"ERRO: o mini game ja esta fehado");
- eventogame = 0;
- return 1;}
- if(eventogame == 0) return SendClientMessage(playerid,0xFF0000,"ERRO: o mini game esta fechado");
- if(eventogame[playerid] == 1) return SendClientMessage(playerid,0xFF0000,"ERRO: Você ja crio o minigame !");
- return 1;}
- //e coloca isso no onplayeconn pra evita algum bug '-' eventogame [playerid] = 0
- // nao sei se è o certo mas coloca isso no ongamemodeinit() pra fechar qnd o gm e ligado ! // nao sei se e fs ou gm ent // '-'
- //eventogame= 0;
- //utilize o eventogame = 0 para fechado entao use ele no comando
- // mude a variavel eventogame para a sua do seu comando
- // eu utilizei a varaivel padmin mas mude para a no ladmin que n sei qual è '-'
Advertisement
Add Comment
Please, Sign In to add comment