Warning

Započeo Teodor, Mart 03, 2020, 16:57:48 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 6 gostiju pregledaju ovu temu.

Problem(error/warning): Nzm kako da fix ovo(imam #pragma tabsize 0)
Dio skripte:
C:\Users\Teodor\Desktop\Moj Servera\gamemodes\DMTest.pwn(2326) : warning 217: loose indentation
C:\Users\Teodor\Desktop\Moj Servera\gamemodes\DMTest.pwn(2574) : warning 217: loose indentation
Pawn compiler 3.10.4	 	 	Copyright (c) 1997-2006, ITB CompuPhase

Header size:           6496 bytes
Code size:           236436 bytes
Data size:         17295992 bytes
Stack/heap size:     339488 bytes; estimated max. usage=1405 cells (5620 bytes)
Total requirements:17878412 bytes

2 Warnings.

Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log):
if(response) //2326
return 1; //2574

Slika/video ingame problema(obavezno ako je ingame problem): link slike
Poslednja Izmena: Mart 03, 2020, 20:31:32 POSLE PODNE od Galardo

probaj  na vrh skripte dodat
#pragma tabsize 0

Citat: Milos3311 poslato Mart 03, 2020, 17:09:20 POSLE PODNE
probaj  na vrh skripte dodat
#pragma tabsize 0

Citat: Teodor poslato Mart 03, 2020, 16:57:48 POSLE PODNE
Problem(error/warning): Nzm kako da fix ovo(imam #pragma tabsize 0)


Citat: Milos3311 poslato Mart 03, 2020, 17:57:53 POSLE PODNE
Prastaj nisam vidjeo,podalji nam citav kod
if(response)
			{
				switch(listitem)
				{
					case 0://Weapon 1
					{
						ShowPlayerDialog(playerid, DUEL_WEAPON1, DIALOG_STYLE_INPUT, ""ORANGE"D // "WHITE"Duel [Weapon 1]", ""ORANGE"> "WHITE"Please, enter Weapon ID, for weapon slot [1] to your duel setup:", "ENTER", "CANCEL");
					}
					case 1://Weapon 2
					{
						ShowPlayerDialog(playerid, DUEL_WEAPON2, DIALOG_STYLE_INPUT, ""ORANGE"D // "WHITE"Duel [Weapon 2]", ""ORANGE"> "WHITE"Please, enter Weapon ID, for weapon slot [2] to your duel setup:", "ENTER", "CANCEL");
					}
					case 2://Weapon 3
					{
						ShowPlayerDialog(playerid, DUEL_WEAPON3, DIALOG_STYLE_INPUT, ""ORANGE"D // "WHITE"Duel [Weapon 3]", ""ORANGE"> "WHITE"Please, enter Weapon ID, for weapon slot [3] to your duel setup:", "ENTER", "CANCEL");
					}
					case 3://HP
					{
						ShowPlayerDialog(playerid, DUEL_HP, DIALOG_STYLE_INPUT, ""ORANGE"D // "WHITE"Duel [HP]", ""ORANGE"> "WHITE"Please, enter starting HP for your duel setup:", "ENTER", "CANCEL");
					}
					case 4://Armour
					{
						ShowPlayerDialog(playerid, DUEL_ARMOUR, DIALOG_STYLE_INPUT, ""ORANGE"D // "WHITE"Duel [Armour]", ""ORANGE"> "WHITE"Please, enter starting armour for your duel setup:", "ENTER", "CANCEL");
					}
					case 5://CBug
					{
						new id = DuelID[playerid];
						if(DuelInfo[id][duelCBug])
						{
							DuelInfo[id][duelCBug] = false;
							SCM(playerid,-1, "You have disabled C-Bug for your duel setup.");
						}
						else
						{
							DuelInfo[id][duelCBug] = true;
							SCM(playerid,-1, "You have enabled C-Bug for your duel setup.");
						}
						setupDuelDialog(playerid, id);
					}
					case 6://Arena
					{
						ShowPlayerDialog(playerid, DUEL_ARENA, DIALOG_STYLE_INPUT, ""ORANGE"D // "WHITE"Duel [Arena]", ""ORANGE"> "WHITE"Please, enter arena for your duel setup:", "ENTER", "CANCEL");
					}
					case 7://Lineup
					{
						new id = DuelID[playerid];
						if(DuelInfo[id][duelLineup] == 1)
						{
							DuelInfo[id][duelLineup] = 2;
							SCM(playerid,-1, "You have changed your lineup to 2v2 for your duel setup.");
						}
						else if(DuelInfo[id][duelLineup] == 2)
						{
							DuelInfo[id][duelLineup] = 3;
							SCM(playerid,-1, "You have changed your lineup to 3v3 for your duel setup.");
						}
						else if(DuelInfo[id][duelLineup] == 3)
						{
							if(hasDuelPlayerOnList(id))
							{
								SCM(playerid,-1, "There are players already in duel setup, reset duel than try again.");
								setupDuelDialog(playerid, id);
								return 1;
							}

							DuelInfo[id][duelLineup] = 1;
							SCM(playerid,-1, "You have changed your lineup to 1v1 for your duel setup.");
						}
						setupDuelDialog(playerid, id);
					}
					case 8://Teammate 1
					{
						new id = DuelID[playerid];
						if(DuelInviteID[playerid] != INVALID_PLAYER_ID)
						{
							SCM(playerid,-1, "You are already inviting someone, please wait.");
							setupDuelDialog(playerid, id);
							return 1;
						}
						if(DuelInfo[id][duelLineup] < 2)
						{
							SCM(playerid,-1, "This slot is locked, first change your lineup settings.");
							setupDuelDialog(playerid, id);
							return 1;
						}
						if(DuelInfo[id][duelTeammate][1] != INVALID_PLAYER_ID)
						{
							SCM(playerid,-1, "There is already player on this slot, reset your duel than try again.");
							setupDuelDialog(playerid, id);
							return 1;
						}

						ShowPlayerDialog(playerid, DUEL_TEAMMATE1, DIALOG_STYLE_INPUT, ""ORANGE"D // "WHITE"Duel [Teammate 1]", ""ORANGE"> "WHITE"Please, enter ID for your teammate [1] for your duel setup:", "ENTER", "CANCEL");
					}
					case 9://Teammate 2
					{
						new id = DuelID[playerid];
						if(DuelInviteID[playerid] != INVALID_PLAYER_ID)
						{
							SCM(playerid,-1, "You are already inviting someone, please wait.");
							setupDuelDialog(playerid, id);
							return 1;
						}
						if(DuelInfo[id][duelLineup] < 3)
						{
							SCM(playerid,-1, "This slot is locked, first change your lineup settings.");
							setupDuelDialog(playerid, id);
							return 1;
						}
						if(DuelInfo[id][duelTeammate][2] != INVALID_PLAYER_ID)
						{
							SCM(playerid,-1, "There is already player on this slot, reset your duel than try again.");
							setupDuelDialog(playerid, id);
							return 1;
						}

						ShowPlayerDialog(playerid, DUEL_TEAMMATE1, DIALOG_STYLE_INPUT, ""ORANGE"D // "WHITE"Duel [Teammate 2]", ""ORANGE"> "WHITE"Please, enter ID for your teammate [2] for your duel setup:", "ENTER", "CANCEL");
					}
					case 10://Opponent 1
					{
						new id = DuelID[playerid];
						if(DuelInviteID[playerid] != INVALID_PLAYER_ID)
						{
							SCM(playerid,-1, "You are already inviting someone, please wait.");
							setupDuelDialog(playerid, id);
							return 1;
						}
						if(DuelInfo[id][duelOpponent][0] != INVALID_PLAYER_ID)
						{
							SCM(playerid,-1, "There is already player on this slot, reset your duel than try again.");
							setupDuelDialog(playerid, id);
							return 1;
						}

						ShowPlayerDialog(playerid, DUEL_OPPONENT1, DIALOG_STYLE_INPUT, ""ORANGE"D // "WHITE"Duel [Opponent 1]", ""ORANGE"> "WHITE"Please, enter ID of your opponent [1] for your duel setup:", "ENTER", "CANCEL");
					}
					case 11://Opponent 2
					{
						new id = DuelID[playerid];
						if(DuelInviteID[playerid] != INVALID_PLAYER_ID)
						{
							SCM(playerid,-1, "You are already inviting someone, please wait.");
							setupDuelDialog(playerid, id);
							return 1;
						}
						if(DuelInfo[id][duelLineup] < 2)
						{
							SCM(playerid,-1, "This slot is locked, first change your lineup settings.");
							setupDuelDialog(playerid, id);
							return 1;
						}
						if(DuelInfo[id][duelOpponent][1] != INVALID_PLAYER_ID)
						{
							SCM(playerid,-1, "There is already player on this slot, reset your duel than try again.");
							setupDuelDialog(playerid, id);
							return 1;
						}

						ShowPlayerDialog(playerid, DUEL_OPPONENT2, DIALOG_STYLE_INPUT, ""ORANGE"D // "WHITE"Duel [Opponent 2]", ""ORANGE"> "WHITE"Please, enter ID of your opponent [2] for your duel setup:", "ENTER", "CANCEL");
					}
					case 12://Opponent 3
					{
						new id = DuelID[playerid];
						if(DuelInviteID[playerid] != INVALID_PLAYER_ID)
						{
							SCM(playerid,-1, "You are already inviting someone, please wait.");
							setupDuelDialog(playerid, id);
							return 1;
						}
						if(DuelInfo[id][duelLineup] < 3)
						{
							SCM(playerid,-1, "This slot is locked, first change your lineup settings.");
							setupDuelDialog(playerid, id);
							return 1;
						}
						if(DuelInfo[id][duelOpponent][2] != INVALID_PLAYER_ID)
						{
							SCM(playerid,-1, "There is already player on this slot, reset your duel than try again.");
							setupDuelDialog(playerid, id);
							return 1;
						}

						ShowPlayerDialog(playerid, DUEL_OPPONENT3, DIALOG_STYLE_INPUT, ""ORANGE"D // "WHITE"Duel [Opponent 3]", ""ORANGE"> "WHITE"Please, enter ID of your opponent [3] for your duel setup:", "ENTER", "CANCEL");
					}
					case 13://Reset
					{
						new duel = DuelID[playerid];
						if(DuelInfo[duel][duelTeammate][1] != INVALID_PLAYER_ID)
						{
							new id = DuelInfo[duel][duelTeammate][1];

							SpawnPlayer(id);
							new str[128];
							format(str, sizeof(str), "Player %s has just restarted his duel setup. You are kicked from session.", GetName(playerid));
							SCM(playerid,-1, str);
						}
						if(DuelInfo[duel][duelTeammate][2] != INVALID_PLAYER_ID)
						{
							new id = DuelInfo[duel][duelTeammate][2];

							SpawnPlayer(id);
							new str[128];
							format(str, sizeof(str), "Player %s has just restarted his duel setup. You are kicked from session.", GetName(playerid));
							SCM(playerid,-1, str);
						}
						if(DuelInfo[duel][duelOpponent][0] != INVALID_PLAYER_ID)
						{
							new id = DuelInfo[duel][duelOpponent][0];

							SpawnPlayer(id);
							new str[128];
							format(str, sizeof(str), "Player %s has just restarted his duel setup. You are kicked from session.", GetName(playerid));
							SCM(playerid,-1, str);
						}
						if(DuelInfo[duel][duelOpponent][1] != INVALID_PLAYER_ID)
						{
							new id = DuelInfo[duel][duelOpponent][1];

							SpawnPlayer(id);
							new str[128];
							format(str, sizeof(str), "Player %s has just restarted his duel setup. You are kicked from session.", GetName(playerid));
							SCM(playerid,-1, str);
						}
						if(DuelInfo[duel][duelOpponent][2] != INVALID_PLAYER_ID)
						{
							new id = DuelInfo[duel][duelOpponent][2];

							SpawnPlayer(id);
							new str[128];
							format(str, sizeof(str), "Player %s has just restarted his duel setup. You are kicked from session.", GetName(playerid));
							SCM(playerid,-1, str);
						}
						resetDuel(duel);
						setupDuelDialog(playerid, duel);
					}
					case 14://Start
					{
						new id = DuelID[playerid];
						if(!isDuelSetupValid(id))
						{
							SCM(playerid,-1, "Duel setup is not finished. Pleasy finish your duel setup first.");
							setupDuelDialog(playerid, id);
						}

						startDuel(playerid);
					}
				}
			}
	return 1;
}

if (response) {
  switch (listitem) {
  case 0: //Weapon 1
    {
      ShowPlayerDialog(playerid, DUEL_WEAPON1, DIALOG_STYLE_INPUT, ""
        ORANGE "D // "
        WHITE "Duel [Weapon 1]", ""
        ORANGE "> "
        WHITE "Please, enter Weapon ID, for weapon slot [1] to your duel setup:", "ENTER", "CANCEL");
    }
  case 1: //Weapon 2
    {
      ShowPlayerDialog(playerid, DUEL_WEAPON2, DIALOG_STYLE_INPUT, ""
        ORANGE "D // "
        WHITE "Duel [Weapon 2]", ""
        ORANGE "> "
        WHITE "Please, enter Weapon ID, for weapon slot [2] to your duel setup:", "ENTER", "CANCEL");
    }
  case 2: //Weapon 3
    {
      ShowPlayerDialog(playerid, DUEL_WEAPON3, DIALOG_STYLE_INPUT, ""
        ORANGE "D // "
        WHITE "Duel [Weapon 3]", ""
        ORANGE "> "
        WHITE "Please, enter Weapon ID, for weapon slot [3] to your duel setup:", "ENTER", "CANCEL");
    }
  case 3: //HP
    {
      ShowPlayerDialog(playerid, DUEL_HP, DIALOG_STYLE_INPUT, ""
        ORANGE "D // "
        WHITE "Duel [HP]", ""
        ORANGE "> "
        WHITE "Please, enter starting HP for your duel setup:", "ENTER", "CANCEL");
    }
  case 4: //Armour
    {
      ShowPlayerDialog(playerid, DUEL_ARMOUR, DIALOG_STYLE_INPUT, ""
        ORANGE "D // "
        WHITE "Duel [Armour]", ""
        ORANGE "> "
        WHITE "Please, enter starting armour for your duel setup:", "ENTER", "CANCEL");
    }
  case 5: //CBug
    {
      new id = DuelID[playerid];
      if (DuelInfo[id][duelCBug]) {
        DuelInfo[id][duelCBug] = false;
        SCM(playerid, -1, "You have disabled C-Bug for your duel setup.");
      } else {
        DuelInfo[id][duelCBug] = true;
        SCM(playerid, -1, "You have enabled C-Bug for your duel setup.");
      }
      setupDuelDialog(playerid, id);
    }
  case 6: //Arena
    {
      ShowPlayerDialog(playerid, DUEL_ARENA, DIALOG_STYLE_INPUT, ""
        ORANGE "D // "
        WHITE "Duel [Arena]", ""
        ORANGE "> "
        WHITE "Please, enter arena for your duel setup:", "ENTER", "CANCEL");
    }
  case 7: //Lineup
    {
      new id = DuelID[playerid];
      if (DuelInfo[id][duelLineup] == 1) {
        DuelInfo[id][duelLineup] = 2;
        SCM(playerid, -1, "You have changed your lineup to 2v2 for your duel setup.");
      } else if (DuelInfo[id][duelLineup] == 2) {
        DuelInfo[id][duelLineup] = 3;
        SCM(playerid, -1, "You have changed your lineup to 3v3 for your duel setup.");
      } else if (DuelInfo[id][duelLineup] == 3) {
        if (hasDuelPlayerOnList(id)) {
          SCM(playerid, -1, "There are players already in duel setup, reset duel than try again.");
          setupDuelDialog(playerid, id);
          return 1;
        }

        DuelInfo[id][duelLineup] = 1;
        SCM(playerid, -1, "You have changed your lineup to 1v1 for your duel setup.");
      }
      setupDuelDialog(playerid, id);
    }
  case 8: //Teammate 1
    {
      new id = DuelID[playerid];
      if (DuelInviteID[playerid] != INVALID_PLAYER_ID) {
        SCM(playerid, -1, "You are already inviting someone, please wait.");
        setupDuelDialog(playerid, id);
        return 1;
      }
      if (DuelInfo[id][duelLineup] < 2) {
        SCM(playerid, -1, "This slot is locked, first change your lineup settings.");
        setupDuelDialog(playerid, id);
        return 1;
      }
      if (DuelInfo[id][duelTeammate][1] != INVALID_PLAYER_ID) {
        SCM(playerid, -1, "There is already player on this slot, reset your duel than try again.");
        setupDuelDialog(playerid, id);
        return 1;
      }

      ShowPlayerDialog(playerid, DUEL_TEAMMATE1, DIALOG_STYLE_INPUT, ""
        ORANGE "D // "
        WHITE "Duel [Teammate 1]", ""
        ORANGE "> "
        WHITE "Please, enter ID for your teammate [1] for your duel setup:", "ENTER", "CANCEL");
    }
  case 9: //Teammate 2
    {
      new id = DuelID[playerid];
      if (DuelInviteID[playerid] != INVALID_PLAYER_ID) {
        SCM(playerid, -1, "You are already inviting someone, please wait.");
        setupDuelDialog(playerid, id);
        return 1;
      }
      if (DuelInfo[id][duelLineup] < 3) {
        SCM(playerid, -1, "This slot is locked, first change your lineup settings.");
        setupDuelDialog(playerid, id);
        return 1;
      }
      if (DuelInfo[id][duelTeammate][2] != INVALID_PLAYER_ID) {
        SCM(playerid, -1, "There is already player on this slot, reset your duel than try again.");
        setupDuelDialog(playerid, id);
        return 1;
      }

      ShowPlayerDialog(playerid, DUEL_TEAMMATE1, DIALOG_STYLE_INPUT, ""
        ORANGE "D // "
        WHITE "Duel [Teammate 2]", ""
        ORANGE "> "
        WHITE "Please, enter ID for your teammate [2] for your duel setup:", "ENTER", "CANCEL");
    }
  case 10: //Opponent 1
    {
      new id = DuelID[playerid];
      if (DuelInviteID[playerid] != INVALID_PLAYER_ID) {
        SCM(playerid, -1, "You are already inviting someone, please wait.");
        setupDuelDialog(playerid, id);
        return 1;
      }
      if (DuelInfo[id][duelOpponent][0] != INVALID_PLAYER_ID) {
        SCM(playerid, -1, "There is already player on this slot, reset your duel than try again.");
        setupDuelDialog(playerid, id);
        return 1;
      }

      ShowPlayerDialog(playerid, DUEL_OPPONENT1, DIALOG_STYLE_INPUT, ""
        ORANGE "D // "
        WHITE "Duel [Opponent 1]", ""
        ORANGE "> "
        WHITE "Please, enter ID of your opponent [1] for your duel setup:", "ENTER", "CANCEL");
    }
  case 11: //Opponent 2
    {
      new id = DuelID[playerid];
      if (DuelInviteID[playerid] != INVALID_PLAYER_ID) {
        SCM(playerid, -1, "You are already inviting someone, please wait.");
        setupDuelDialog(playerid, id);
        return 1;
      }
      if (DuelInfo[id][duelLineup] < 2) {
        SCM(playerid, -1, "This slot is locked, first change your lineup settings.");
        setupDuelDialog(playerid, id);
        return 1;
      }
      if (DuelInfo[id][duelOpponent][1] != INVALID_PLAYER_ID) {
        SCM(playerid, -1, "There is already player on this slot, reset your duel than try again.");
        setupDuelDialog(playerid, id);
        return 1;
      }

      ShowPlayerDialog(playerid, DUEL_OPPONENT2, DIALOG_STYLE_INPUT, ""
        ORANGE "D // "
        WHITE "Duel [Opponent 2]", ""
        ORANGE "> "
        WHITE "Please, enter ID of your opponent [2] for your duel setup:", "ENTER", "CANCEL");
    }
  case 12: //Opponent 3
    {
      new id = DuelID[playerid];
      if (DuelInviteID[playerid] != INVALID_PLAYER_ID) {
        SCM(playerid, -1, "You are already inviting someone, please wait.");
        setupDuelDialog(playerid, id);
        return 1;
      }
      if (DuelInfo[id][duelLineup] < 3) {
        SCM(playerid, -1, "This slot is locked, first change your lineup settings.");
        setupDuelDialog(playerid, id);
        return 1;
      }
      if (DuelInfo[id][duelOpponent][2] != INVALID_PLAYER_ID) {
        SCM(playerid, -1, "There is already player on this slot, reset your duel than try again.");
        setupDuelDialog(playerid, id);
        return 1;
      }

      ShowPlayerDialog(playerid, DUEL_OPPONENT3, DIALOG_STYLE_INPUT, ""
        ORANGE "D // "
        WHITE "Duel [Opponent 3]", ""
        ORANGE "> "
        WHITE "Please, enter ID of your opponent [3] for your duel setup:", "ENTER", "CANCEL");
    }
  case 13: //Reset
    {
      new duel = DuelID[playerid];
      if (DuelInfo[duel][duelTeammate][1] != INVALID_PLAYER_ID) {
        new id = DuelInfo[duel][duelTeammate][1];

        SpawnPlayer(id);
        new str[128];
        format(str, sizeof(str), "Player %s has just restarted his duel setup. You are kicked from session.", GetName(playerid));
        SCM(playerid, -1, str);
      }
      if (DuelInfo[duel][duelTeammate][2] != INVALID_PLAYER_ID) {
        new id = DuelInfo[duel][duelTeammate][2];

        SpawnPlayer(id);
        new str[128];
        format(str, sizeof(str), "Player %s has just restarted his duel setup. You are kicked from session.", GetName(playerid));
        SCM(playerid, -1, str);
      }
      if (DuelInfo[duel][duelOpponent][0] != INVALID_PLAYER_ID) {
        new id = DuelInfo[duel][duelOpponent][0];

        SpawnPlayer(id);
        new str[128];
        format(str, sizeof(str), "Player %s has just restarted his duel setup. You are kicked from session.", GetName(playerid));
        SCM(playerid, -1, str);
      }
      if (DuelInfo[duel][duelOpponent][1] != INVALID_PLAYER_ID) {
        new id = DuelInfo[duel][duelOpponent][1];

        SpawnPlayer(id);
        new str[128];
        format(str, sizeof(str), "Player %s has just restarted his duel setup. You are kicked from session.", GetName(playerid));
        SCM(playerid, -1, str);
      }
      if (DuelInfo[duel][duelOpponent][2] != INVALID_PLAYER_ID) {
        new id = DuelInfo[duel][duelOpponent][2];

        SpawnPlayer(id);
        new str[128];
        format(str, sizeof(str), "Player %s has just restarted his duel setup. You are kicked from session.", GetName(playerid));
        SCM(playerid, -1, str);
      }
      resetDuel(duel);
      setupDuelDialog(playerid, duel);
    }
  case 14: //Start
    {
      new id = DuelID[playerid];
      if (!isDuelSetupValid(id)) {
        SCM(playerid, -1, "Duel setup is not finished. Pleasy finish your duel setup first.");
        setupDuelDialog(playerid, id);
      }

      startDuel(playerid);
    }
  }
}
return 1;
}
[Include] > Optidraw
[Include] > Model-Sizes-SQL

Citat: algorhitmically poslato Mart 03, 2020, 18:14:37 POSLE PODNE
if (response) {
  switch (listitem) {
  case 0: //Weapon 1
    {
      ShowPlayerDialog(playerid, DUEL_WEAPON1, DIALOG_STYLE_INPUT, ""
        ORANGE "D // "
        WHITE "Duel [Weapon 1]", ""
        ORANGE "> "
        WHITE "Please, enter Weapon ID, for weapon slot [1] to your duel setup:", "ENTER", "CANCEL");
    }
  case 1: //Weapon 2
    {
      ShowPlayerDialog(playerid, DUEL_WEAPON2, DIALOG_STYLE_INPUT, ""
        ORANGE "D // "
        WHITE "Duel [Weapon 2]", ""
        ORANGE "> "
        WHITE "Please, enter Weapon ID, for weapon slot [2] to your duel setup:", "ENTER", "CANCEL");
    }
  case 2: //Weapon 3
    {
      ShowPlayerDialog(playerid, DUEL_WEAPON3, DIALOG_STYLE_INPUT, ""
        ORANGE "D // "
        WHITE "Duel [Weapon 3]", ""
        ORANGE "> "
        WHITE "Please, enter Weapon ID, for weapon slot [3] to your duel setup:", "ENTER", "CANCEL");
    }
  case 3: //HP
    {
      ShowPlayerDialog(playerid, DUEL_HP, DIALOG_STYLE_INPUT, ""
        ORANGE "D // "
        WHITE "Duel [HP]", ""
        ORANGE "> "
        WHITE "Please, enter starting HP for your duel setup:", "ENTER", "CANCEL");
    }
  case 4: //Armour
    {
      ShowPlayerDialog(playerid, DUEL_ARMOUR, DIALOG_STYLE_INPUT, ""
        ORANGE "D // "
        WHITE "Duel [Armour]", ""
        ORANGE "> "
        WHITE "Please, enter starting armour for your duel setup:", "ENTER", "CANCEL");
    }
  case 5: //CBug
    {
      new id = DuelID[playerid];
      if (DuelInfo[id][duelCBug]) {
        DuelInfo[id][duelCBug] = false;
        SCM(playerid, -1, "You have disabled C-Bug for your duel setup.");
      } else {
        DuelInfo[id][duelCBug] = true;
        SCM(playerid, -1, "You have enabled C-Bug for your duel setup.");
      }
      setupDuelDialog(playerid, id);
    }
  case 6: //Arena
    {
      ShowPlayerDialog(playerid, DUEL_ARENA, DIALOG_STYLE_INPUT, ""
        ORANGE "D // "
        WHITE "Duel [Arena]", ""
        ORANGE "> "
        WHITE "Please, enter arena for your duel setup:", "ENTER", "CANCEL");
    }
  case 7: //Lineup
    {
      new id = DuelID[playerid];
      if (DuelInfo[id][duelLineup] == 1) {
        DuelInfo[id][duelLineup] = 2;
        SCM(playerid, -1, "You have changed your lineup to 2v2 for your duel setup.");
      } else if (DuelInfo[id][duelLineup] == 2) {
        DuelInfo[id][duelLineup] = 3;
        SCM(playerid, -1, "You have changed your lineup to 3v3 for your duel setup.");
      } else if (DuelInfo[id][duelLineup] == 3) {
        if (hasDuelPlayerOnList(id)) {
          SCM(playerid, -1, "There are players already in duel setup, reset duel than try again.");
          setupDuelDialog(playerid, id);
          return 1;
        }

        DuelInfo[id][duelLineup] = 1;
        SCM(playerid, -1, "You have changed your lineup to 1v1 for your duel setup.");
      }
      setupDuelDialog(playerid, id);
    }
  case 8: //Teammate 1
    {
      new id = DuelID[playerid];
      if (DuelInviteID[playerid] != INVALID_PLAYER_ID) {
        SCM(playerid, -1, "You are already inviting someone, please wait.");
        setupDuelDialog(playerid, id);
        return 1;
      }
      if (DuelInfo[id][duelLineup] < 2) {
        SCM(playerid, -1, "This slot is locked, first change your lineup settings.");
        setupDuelDialog(playerid, id);
        return 1;
      }
      if (DuelInfo[id][duelTeammate][1] != INVALID_PLAYER_ID) {
        SCM(playerid, -1, "There is already player on this slot, reset your duel than try again.");
        setupDuelDialog(playerid, id);
        return 1;
      }

      ShowPlayerDialog(playerid, DUEL_TEAMMATE1, DIALOG_STYLE_INPUT, ""
        ORANGE "D // "
        WHITE "Duel [Teammate 1]", ""
        ORANGE "> "
        WHITE "Please, enter ID for your teammate [1] for your duel setup:", "ENTER", "CANCEL");
    }
  case 9: //Teammate 2
    {
      new id = DuelID[playerid];
      if (DuelInviteID[playerid] != INVALID_PLAYER_ID) {
        SCM(playerid, -1, "You are already inviting someone, please wait.");
        setupDuelDialog(playerid, id);
        return 1;
      }
      if (DuelInfo[id][duelLineup] < 3) {
        SCM(playerid, -1, "This slot is locked, first change your lineup settings.");
        setupDuelDialog(playerid, id);
        return 1;
      }
      if (DuelInfo[id][duelTeammate][2] != INVALID_PLAYER_ID) {
        SCM(playerid, -1, "There is already player on this slot, reset your duel than try again.");
        setupDuelDialog(playerid, id);
        return 1;
      }

      ShowPlayerDialog(playerid, DUEL_TEAMMATE1, DIALOG_STYLE_INPUT, ""
        ORANGE "D // "
        WHITE "Duel [Teammate 2]", ""
        ORANGE "> "
        WHITE "Please, enter ID for your teammate [2] for your duel setup:", "ENTER", "CANCEL");
    }
  case 10: //Opponent 1
    {
      new id = DuelID[playerid];
      if (DuelInviteID[playerid] != INVALID_PLAYER_ID) {
        SCM(playerid, -1, "You are already inviting someone, please wait.");
        setupDuelDialog(playerid, id);
        return 1;
      }
      if (DuelInfo[id][duelOpponent][0] != INVALID_PLAYER_ID) {
        SCM(playerid, -1, "There is already player on this slot, reset your duel than try again.");
        setupDuelDialog(playerid, id);
        return 1;
      }

      ShowPlayerDialog(playerid, DUEL_OPPONENT1, DIALOG_STYLE_INPUT, ""
        ORANGE "D // "
        WHITE "Duel [Opponent 1]", ""
        ORANGE "> "
        WHITE "Please, enter ID of your opponent [1] for your duel setup:", "ENTER", "CANCEL");
    }
  case 11: //Opponent 2
    {
      new id = DuelID[playerid];
      if (DuelInviteID[playerid] != INVALID_PLAYER_ID) {
        SCM(playerid, -1, "You are already inviting someone, please wait.");
        setupDuelDialog(playerid, id);
        return 1;
      }
      if (DuelInfo[id][duelLineup] < 2) {
        SCM(playerid, -1, "This slot is locked, first change your lineup settings.");
        setupDuelDialog(playerid, id);
        return 1;
      }
      if (DuelInfo[id][duelOpponent][1] != INVALID_PLAYER_ID) {
        SCM(playerid, -1, "There is already player on this slot, reset your duel than try again.");
        setupDuelDialog(playerid, id);
        return 1;
      }

      ShowPlayerDialog(playerid, DUEL_OPPONENT2, DIALOG_STYLE_INPUT, ""
        ORANGE "D // "
        WHITE "Duel [Opponent 2]", ""
        ORANGE "> "
        WHITE "Please, enter ID of your opponent [2] for your duel setup:", "ENTER", "CANCEL");
    }
  case 12: //Opponent 3
    {
      new id = DuelID[playerid];
      if (DuelInviteID[playerid] != INVALID_PLAYER_ID) {
        SCM(playerid, -1, "You are already inviting someone, please wait.");
        setupDuelDialog(playerid, id);
        return 1;
      }
      if (DuelInfo[id][duelLineup] < 3) {
        SCM(playerid, -1, "This slot is locked, first change your lineup settings.");
        setupDuelDialog(playerid, id);
        return 1;
      }
      if (DuelInfo[id][duelOpponent][2] != INVALID_PLAYER_ID) {
        SCM(playerid, -1, "There is already player on this slot, reset your duel than try again.");
        setupDuelDialog(playerid, id);
        return 1;
      }

      ShowPlayerDialog(playerid, DUEL_OPPONENT3, DIALOG_STYLE_INPUT, ""
        ORANGE "D // "
        WHITE "Duel [Opponent 3]", ""
        ORANGE "> "
        WHITE "Please, enter ID of your opponent [3] for your duel setup:", "ENTER", "CANCEL");
    }
  case 13: //Reset
    {
      new duel = DuelID[playerid];
      if (DuelInfo[duel][duelTeammate][1] != INVALID_PLAYER_ID) {
        new id = DuelInfo[duel][duelTeammate][1];

        SpawnPlayer(id);
        new str[128];
        format(str, sizeof(str), "Player %s has just restarted his duel setup. You are kicked from session.", GetName(playerid));
        SCM(playerid, -1, str);
      }
      if (DuelInfo[duel][duelTeammate][2] != INVALID_PLAYER_ID) {
        new id = DuelInfo[duel][duelTeammate][2];

        SpawnPlayer(id);
        new str[128];
        format(str, sizeof(str), "Player %s has just restarted his duel setup. You are kicked from session.", GetName(playerid));
        SCM(playerid, -1, str);
      }
      if (DuelInfo[duel][duelOpponent][0] != INVALID_PLAYER_ID) {
        new id = DuelInfo[duel][duelOpponent][0];

        SpawnPlayer(id);
        new str[128];
        format(str, sizeof(str), "Player %s has just restarted his duel setup. You are kicked from session.", GetName(playerid));
        SCM(playerid, -1, str);
      }
      if (DuelInfo[duel][duelOpponent][1] != INVALID_PLAYER_ID) {
        new id = DuelInfo[duel][duelOpponent][1];

        SpawnPlayer(id);
        new str[128];
        format(str, sizeof(str), "Player %s has just restarted his duel setup. You are kicked from session.", GetName(playerid));
        SCM(playerid, -1, str);
      }
      if (DuelInfo[duel][duelOpponent][2] != INVALID_PLAYER_ID) {
        new id = DuelInfo[duel][duelOpponent][2];

        SpawnPlayer(id);
        new str[128];
        format(str, sizeof(str), "Player %s has just restarted his duel setup. You are kicked from session.", GetName(playerid));
        SCM(playerid, -1, str);
      }
      resetDuel(duel);
      setupDuelDialog(playerid, duel);
    }
  case 14: //Start
    {
      new id = DuelID[playerid];
      if (!isDuelSetupValid(id)) {
        SCM(playerid, -1, "Duel setup is not finished. Pleasy finish your duel setup first.");
        setupDuelDialog(playerid, id);
      }

      startDuel(playerid);
    }
  }
}
return 1;
}

Opet isto



Citat: t1m1c poslato Mart 03, 2020, 20:06:41 POSLE PODNE
Izravnaj linije
Mislis ovako??

if(response)
  {
  	switch (listitem)
  		{
			case 0: //Weapon 1
		    {
		      ShowPlayerDialog(playerid, DUEL_WEAPON1, DIALOG_STYLE_INPUT, "Duel [Weapon 1]","Please, enter Weapon ID, for weapon slot [1] to your duel setup:", "ENTER", "CANCEL");
		    }
		  case 1: //Weapon 2
		    {
		      ShowPlayerDialog(playerid, DUEL_WEAPON2, DIALOG_STYLE_INPUT, "Duel [Weapon 2]","Please, enter Weapon ID, for weapon slot [2] to your duel setup:", "ENTER", "CANCEL");
		    }
		  case 2: //Weapon 3
		    {
		      ShowPlayerDialog(playerid, DUEL_WEAPON3, DIALOG_STYLE_INPUT, "Duel [Weapon 3]","Please, enter Weapon ID, for weapon slot [3] to your duel setup:", "ENTER", "CANCEL");
		    }
		  case 3: //HP
		    {
		      ShowPlayerDialog(playerid, DUEL_HP, DIALOG_STYLE_INPUT, "Duel [HP]","Please, enter starting HP for your duel setup:", "ENTER", "CANCEL");
		    }
		  case 4: //Armour
		    {
		      ShowPlayerDialog(playerid, DUEL_ARMOUR, DIALOG_STYLE_INPUT, "Duel [Armour]","Please, enter starting armour for your duel setup:", "ENTER", "CANCEL");
		    }
		  case 5: //CBug
		    {
		      new id = DuelID[playerid];
		      if (DuelInfo[id][duelCBug])
			  {
		        DuelInfo[id][duelCBug] = false;
		        SCM(playerid, -1, "You have disabled C-Bug for your duel setup.");
		      }
			  else
			  {
		        DuelInfo[id][duelCBug] = true;
		        SCM(playerid, -1, "You have enabled C-Bug for your duel setup.");
		      }
		      setupDuelDialog(playerid, id);
		    }
		  case 6: //Arena
		    {
		      ShowPlayerDialog(playerid, DUEL_ARENA, DIALOG_STYLE_INPUT, "Duel [Arena]","Please, enter arena for your duel setup:", "ENTER", "CANCEL");
		    }
		  case 7: //Lineup
		    {
		      new id = DuelID[playerid];
		      if (DuelInfo[id][duelLineup] == 1)
			  {
		        DuelInfo[id][duelLineup] = 2;
		        SCM(playerid, -1, "You have changed your lineup to 2v2 for your duel setup.");
		      }
			  else if (DuelInfo[id][duelLineup] == 2)
			  {
		        DuelInfo[id][duelLineup] = 3;
		        SCM(playerid, -1, "You have changed your lineup to 3v3 for your duel setup.");
		      }
			  else if (DuelInfo[id][duelLineup] == 3)
			  {
		        if (hasDuelPlayerOnList(id))
				{
		          SCM(playerid, -1, "There are players already in duel setup, reset duel than try again.");
		          setupDuelDialog(playerid, id);
		          return 1;
		        }

		        DuelInfo[id][duelLineup] = 1;
		        SCM(playerid, -1, "You have changed your lineup to 1v1 for your duel setup.");
		      }
		      setupDuelDialog(playerid, id);
		    }
		  case 8: //Teammate 1
		    {
		      new id = DuelID[playerid];
		      if (DuelInviteID[playerid] != INVALID_PLAYER_ID)
			  {
		        SCM(playerid, -1, "You are already inviting someone, please wait.");
		        setupDuelDialog(playerid, id);
		        return 1;
		      }
		      if (DuelInfo[id][duelLineup] < 2)
			  {
		        SCM(playerid, -1, "This slot is locked, first change your lineup settings.");
		        setupDuelDialog(playerid, id);
		        return 1;
		      }
		      if (DuelInfo[id][duelTeammate][1] != INVALID_PLAYER_ID)
			  {
		        SCM(playerid, -1, "There is already player on this slot, reset your duel than try again.");
		        setupDuelDialog(playerid, id);
		        return 1;
		      }

		      ShowPlayerDialog(playerid, DUEL_TEAMMATE1, DIALOG_STYLE_INPUT, "Duel [Teammate 1]","Please, enter ID for your teammate [1] for your duel setup:", "ENTER", "CANCEL");
		    }
		  case 9: //Teammate 2
		    {
		      new id = DuelID[playerid];
		      if (DuelInviteID[playerid] != INVALID_PLAYER_ID)
			  {
		        SCM(playerid, -1, "You are already inviting someone, please wait.");
		        setupDuelDialog(playerid, id);
		        return 1;
		      }
		      if (DuelInfo[id][duelLineup] < 3)
			  {
		        SCM(playerid, -1, "This slot is locked, first change your lineup settings.");
		        setupDuelDialog(playerid, id);
		        return 1;
		      }
		      if (DuelInfo[id][duelTeammate][2] != INVALID_PLAYER_ID)
			  {
		        SCM(playerid, -1, "There is already player on this slot, reset your duel than try again.");
		        setupDuelDialog(playerid, id);
		        return 1;
		      }
		      ShowPlayerDialog(playerid, DUEL_TEAMMATE1, DIALOG_STYLE_INPUT,"Duel [Teammate 2]","Please, enter ID for your teammate [2] for your duel setup:", "ENTER", "CANCEL");
		    }
		  case 10: //Opponent 1
		    {
		      new id = DuelID[playerid];
		      if (DuelInviteID[playerid] != INVALID_PLAYER_ID)
			  {
		        SCM(playerid, -1, "You are already inviting someone, please wait.");
		        setupDuelDialog(playerid, id);
		        return 1;
		      }
		      if (DuelInfo[id][duelOpponent][0] != INVALID_PLAYER_ID)
			  {
		        SCM(playerid, -1, "There is already player on this slot, reset your duel than try again.");
		        setupDuelDialog(playerid, id);
		        return 1;
		      }

		      ShowPlayerDialog(playerid, DUEL_OPPONENT1, DIALOG_STYLE_INPUT,"Duel [Opponent 1]","Please, enter ID of your opponent [1] for your duel setup:", "ENTER", "CANCEL");
		    }
		  case 11: //Opponent 2
		    {
		      new id = DuelID[playerid];
		      if (DuelInviteID[playerid] != INVALID_PLAYER_ID)
			  {
		        SCM(playerid, -1, "You are already inviting someone, please wait.");
		        setupDuelDialog(playerid, id);
		        return 1;
		      }
		      if (DuelInfo[id][duelLineup] < 2)
			  {
		        SCM(playerid, -1, "This slot is locked, first change your lineup settings.");
		        setupDuelDialog(playerid, id);
		        return 1;
		      }
		      if (DuelInfo[id][duelOpponent][1] != INVALID_PLAYER_ID)
			  {
		        SCM(playerid, -1, "There is already player on this slot, reset your duel than try again.");
		        setupDuelDialog(playerid, id);
		        return 1;
		      }

		      ShowPlayerDialog(playerid, DUEL_OPPONENT2, DIALOG_STYLE_INPUT,"Duel [Opponent 2]","Please, enter ID of your opponent [2] for your duel setup:", "ENTER", "CANCEL");
		    }
		  case 12: //Opponent 3
		    {
		      new id = DuelID[playerid];
		      if (DuelInviteID[playerid] != INVALID_PLAYER_ID)
			  {
		        SCM(playerid, -1, "You are already inviting someone, please wait.");
		        setupDuelDialog(playerid, id);
		        return 1;
		      }
		      if (DuelInfo[id][duelLineup] < 3)
			  {
		        SCM(playerid, -1, "This slot is locked, first change your lineup settings.");
		        setupDuelDialog(playerid, id);
		        return 1;
		      }
		      if (DuelInfo[id][duelOpponent][2] != INVALID_PLAYER_ID)
			  {
		        SCM(playerid, -1, "There is already player on this slot, reset your duel than try again.");
		        setupDuelDialog(playerid, id);
		        return 1;
		      }

		      ShowPlayerDialog(playerid, DUEL_OPPONENT3, DIALOG_STYLE_INPUT, "Duel [Opponent 3]","Please, enter ID of your opponent [3] for your duel setup:", "ENTER", "CANCEL");
		    }
		  case 13: //Reset
		    {
		      new duel = DuelID[playerid];
		      if (DuelInfo[duel][duelTeammate][1] != INVALID_PLAYER_ID)
			  {
		        new id = DuelInfo[duel][duelTeammate][1];
		        SpawnPlayer(id);
		        new str[128];
		        format(str, sizeof(str), "Player %s has just restarted his duel setup. You are kicked from session.", GetName(playerid));
		        SCM(playerid, -1, str);
		      }
		      if (DuelInfo[duel][duelTeammate][2] != INVALID_PLAYER_ID)
			  {
		        new id = DuelInfo[duel][duelTeammate][2];
		        SpawnPlayer(id);
		        new str[128];
		        format(str, sizeof(str), "Player %s has just restarted his duel setup. You are kicked from session.", GetName(playerid));
		        SCM(playerid, -1, str);
		      }
		      if (DuelInfo[duel][duelOpponent][0] != INVALID_PLAYER_ID)
			  {
		        new id = DuelInfo[duel][duelOpponent][0];
		        SpawnPlayer(id);
		        new str[128];
		        format(str, sizeof(str), "Player %s has just restarted his duel setup. You are kicked from session.", GetName(playerid));
		        SCM(playerid, -1, str);
		      }
		      if (DuelInfo[duel][duelOpponent][1] != INVALID_PLAYER_ID)
			  {
		        new id = DuelInfo[duel][duelOpponent][1];
		        SpawnPlayer(id);
		        new str[128];
		        format(str, sizeof(str), "Player %s has just restarted his duel setup. You are kicked from session.", GetName(playerid));
		        SCM(playerid, -1, str);
		      }
		      if (DuelInfo[duel][duelOpponent][2] != INVALID_PLAYER_ID)
			  {
		        new id = DuelInfo[duel][duelOpponent][2];
		        SpawnPlayer(id);
		        new str[128];
		        format(str, sizeof(str), "Player %s has just restarted his duel setup. You are kicked from session.", GetName(playerid));
		        SCM(playerid, -1, str);
		      }
		      resetDuel(duel);
		      setupDuelDialog(playerid, duel);
		    }
		  case 14: //Start
		    {
		      new id = DuelID[playerid];
		      if (!isDuelSetupValid(id))
			  {
		        SCM(playerid, -1, "Duel setup is not finished. Pleasy finish your duel setup first.");
		        setupDuelDialog(playerid, id);
		      }
		      startDuel(playerid);
		    }
		  }
		}
return 1;
}


FIXANOOOOOOOOOOOOOOOOO xD