Okay, I am trying to make a dialog list which if the player click on one of the weapons he should start a training;
pawn Код:
if(dialogid == 0) // Ammunation
{
if(response)
{
if(listitem == 1)
{
if(GetPlayerMoney(playerid) > 49)
{
if(PlayerInfo[playerid][pPistSkill] < 1000)
{
SendClientMessage(playerid, COLOR_GREY, "TRAINER: We are going to Start the Pistol Training in a few Seconds");
TrainTimer[playerid] = SetTimerEx("TrainPistol", 2500, false, "i", playerid);
}
else
{
SendClientMessage(playerid, COLOR_GREY, "TRAINER: You are already an Expert with this weapon!");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "TRAINER: You don't have enough money!");
return 1;
}
}
else if(listitem == 2)
{
if(GetPlayerMoney(playerid) > 75)
{
if(PlayerInfo[playerid][pSilenSkill] < 1000)
{
SendClientMessage(playerid, COLOR_GREY, "TRAINER: We are going to Start the Silenced Pistol Training in a few Seconds");
TrainTimer[playerid] = SetTimerEx("TrainSilenced", 2500, false, "i", playerid);
}
else
{
SendClientMessage(playerid, COLOR_GREY, "TRAINER: You are already an Expert with this weapon!");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "TRAINER: You don't have enough money!");
return 1;
}
}
else if(listitem == 3)
{
if(GetPlayerMoney(playerid) > 150)
{
if(PlayerInfo[playerid][pDesertSkill] < 1000)
{
SendClientMessage(playerid, COLOR_GREY, "TRAINER: We are going to Start the Deagle Training in a few Seconds");
TrainTimer[playerid] = SetTimerEx("TrainDeagle", 2500, false, "i", playerid);
}
else
{
SendClientMessage(playerid, COLOR_GREY, "TRAINER: You are already an Expert with this weapon!");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "TRAINER: You don't have enough money!");
return 1;
}
}
else if(listitem == 4)
{
if(GetPlayerMoney(playerid) > 125)
{
if(PlayerInfo[playerid][pShotgSkill] < 1000)
{
SendClientMessage(playerid, COLOR_GREY, "TRAINER: We are going to Start the Shotgun Training in a few Seconds");
TrainTimer[playerid] = SetTimerEx("TrainShotgun", 2500, false, "i", playerid);
}
else
{
SendClientMessage(playerid, COLOR_GREY, "TRAINER: You are already an Expert with this weapon!");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "TRAINER: You don't have enough money!");
return 1;
}
}
else if(listitem == 5)
{
if(GetPlayerMoney(playerid) > 100)
{
if(PlayerInfo[playerid][pSawnSkill] < 800)
{
SendClientMessage(playerid, COLOR_GREY, "TRAINER: We are going to Start the Sawn-Off Training in a few Seconds");
TrainTimer[playerid] = SetTimerEx("TrainSawn", 2500, false, "i", playerid);
}
else
{
SendClientMessage(playerid, COLOR_GREY, "TRAINER: You are already an Expert with this weapon!");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "TRAINER: You don't have enough money!");
return 1;
}
}
else if(listitem == 6)
{
if(GetPlayerMoney(playerid) > 200)
{
if(PlayerInfo[playerid][pCombSkill] < 1000)
{
SendClientMessage(playerid, COLOR_GREY, "TRAINER: We are going to Start the Combat Shotgun Training in a few Seconds");
TrainTimer[playerid] = SetTimerEx("TrainCombat", 2500, false, "i", playerid);
}
else
{
SendClientMessage(playerid, COLOR_GREY, "TRAINER: You are already an Expert with this weapon!");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "TRAINER: You don't have enough money!");
return 1;
}
}
else if(listitem == 7)
{
if(GetPlayerMoney(playerid) > 125)
{
if(PlayerInfo[playerid][pUziSkill] < 800)
{
SendClientMessage(playerid, COLOR_GREY, "TRAINER: We are going to Start the Micro Sub Machine Gun Training in a few Seconds");
TrainTimer[playerid] = SetTimerEx("TrainUzi", 2500, false, "i", playerid);
}
else
{
SendClientMessage(playerid, COLOR_GREY, "TRAINER: You are already an Expert with this weapon!");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "TRAINER: You don't have enough money!");
return 1;
}
}
else if(listitem == 8)
{
if(GetPlayerMoney(playerid) > 155)
{
if(PlayerInfo[playerid][pSmgSkill] < 1000)
{
SendClientMessage(playerid, COLOR_GREY, "TRAINER: We are going to Start the MP5 Training in a few Seconds");
TrainTimer[playerid] = SetTimerEx("TrainSmg", 2500, false, "i", playerid);
}
else
{
SendClientMessage(playerid, COLOR_GREY, "TRAINER: You are already an Expert with this weapon!");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "TRAINER: You don't have enough money!");
return 1;
}
}
else if(listitem == 9)
{
if(GetPlayerMoney(playerid) > 140)
{
if(PlayerInfo[playerid][pAkSkill] < 1000)
{
SendClientMessage(playerid, COLOR_GREY, "TRAINER: We are going to Start the AK-47 Training in a few Seconds");
TrainTimer[playerid] = SetTimerEx("TrainAk47", 2500, false, "i", playerid);
}
else
{
SendClientMessage(playerid, COLOR_GREY, "TRAINER: You are already an Expert with this weapon!");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "TRAINER: You don't have enough money!");
return 1;
}
}
else if(listitem == 10)
{
if(GetPlayerMoney(playerid) > 140)
{
if(PlayerInfo[playerid][pM4Skill] < 1000)
{
SendClientMessage(playerid, COLOR_GREY, "TRAINER: We are going to Start the M4 Training in a few Seconds");
TrainTimer[playerid] = SetTimerEx("TrainM4", 2500, false, "i", playerid);
}
else
{
SendClientMessage(playerid, COLOR_GREY, "TRAINER: You are already an Expert with this weapon!");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "TRAINER: You don't have enough money!");
return 1;
}
}
}
else
{
SendClientMessage(playerid, 0xFFFFFFFF, "You selected Cancel");
}
return 1;
}
Stop bumping. You must wait 48 hours between bumps.
You don't even explain what the problem is..
Loose indentation just means it's not indented properly. Each 'level' should be indented one level, so the opening and closing braces/brackets are aligned. This makes code easier to read:
As for the fourth error, you already declared a variable called 'idcar' so re-name it and any related to it.