22.12.2011, 11:55
The compile is not running, because it is wrong, but i do not know why:
else if(dialogid == DIALOG_PIAC)
{
listitem++;
switch(termekek)
{
case 1;
{
if(GetMoney(playerid) < 10000)
{
format(string, sizeof(string), "Ezt nem tudod kifizetni...");
ShowPlayerDialog(playerid, DIALOG_VESZ, DIALOG_STYLE_MSGBOX, string, "OK", "Mйgse");
TogglePlayerControllable(playerid, true);
return 1;
}
if(PiacInfo[fMati] < 400)
{
Msg(playerid, "A gyбrnak nincs elйg alkatrйsze a fegyver цsszerakбsбhoz...");
return 1;
}
GiveMoney(playerid, -10000);
GiveWeapon(playerid, 24, 150);
Cselekves(playerid "vett valamit...");
PiacInfo[fMati] = PiacInfo[fMati] - 400;
format(string, sizeof(string), "Sikeresen vettйl egy deagle-t");
ShowPlayerDialog(playerid, DIALOG_VESZ, DIALOG_STYLE_MSGBOX, "Piac", string, "OK", "Mйgse");
TogglePlayerControllable(playerid, true);
}
case 2;
{
if(GetMoney(playerid) < 8000)
{
format(string, sizeof(string), "Ezt nem tudod kifizetni...");
ShowPlayerDialog(playerid, DIALOG_VESZ, DIALOG_STYLE_MSGBOX, string, "OK", "Mйgse");
TogglePlayerControllable(playerid, true);
return 1;
}
if(PiacInfo[fMati] < 300)
{
Msg(playerid, "A gyбrnak nincs elйg alkatrйsze a fegyver цsszerakбsбhoz...");
return 1;
}
GiveMoney(playerid, -8000);
GiveWeapon(playerid, 22, 150);
Cselekves(playerid "vett valamit...");
PiacInfo[fMati] = PiacInfo[fMati] - 300;
format(string, sizeof(string), "Sikeresen vettйl egy colt-ot");
ShowPlayerDialog(playerid, DIALOG_VESZ, DIALOG_STYLE_MSGBOX, "Piac", string, "OK", "Mйgse");
TogglePlayerControllable(playerid, true);
}
case 3;
{
if(GetMoney(playerid) < 5000)
{
format(string, sizeof(string), "Ezt nem tudod kifizetni...");
ShowPlayerDialog(playerid, DIALOG_VESZ, DIALOG_STYLE_MSGBOX, string, "OK", "Mйgse");
TogglePlayerControllable(playerid, true);
return 1;
}
if(PiacInfo[fMati] < 100)
{
Msg(playerid, "A gyбrnak nincs elйg alkatrйsze a fegyver цsszerakбsбhoz...");
return 1;
}
GiveMoney(playerid, -5000);
GiveWeapon(playerid, 3, 1);
Cselekves(playerid "vett valamit...");
PiacInfo[fMati] = PiacInfo[fMati] - 300;
format(string, sizeof(string), "Sikeresen vettйl egy gumibotot");
ShowPlayerDialog(playerid, DIALOG_VESZ, DIALOG_STYLE_MSGBOX, "Piac", string, "OK", "Mйgse");
TogglePlayerControllable(playerid, true);
}
case 4;
{
if(GetMoney(playerid) < 3000)
{
format(string, sizeof(string), "Ezt nem tudod kifizetni...");
ShowPlayerDialog(playerid, DIALOG_VESZ, DIALOG_STYLE_MSGBOX, string, "OK", "Mйgse");
TogglePlayerControllable(playerid, true);
return 1;
}
if(PiacInfo[fMati] < 50)
{
Msg(playerid, "A gyбrnak nincs elйg alkatrйsze a fegyver цsszerakбsбhoz...");
return 1;
}
GiveMoney(playerid, -3000);
GiveWeapon(playerid, 4, 1);
Cselekves(playerid "vett valamit...");
PiacInfo[fMati] = PiacInfo[fMati] - 50;
format(string, sizeof(string), "Sikeresen vettйl egy kйst");
ShowPlayerDialog(playerid, DIALOG_VESZ, DIALOG_STYLE_MSGBOX, "Piac", string, "OK", "Mйgse");
TogglePlayerControllable(playerid, true);
}
case 5;
{
if(GetMoney(playerid) < 5000)
{
format(string, sizeof(string), "Ezt nem tudod kifizetni...");
ShowPlayerDialog(playerid, DIALOG_VESZ, DIALOG_STYLE_MSGBOX, string, "OK", "Mйgse");
TogglePlayerControllable(playerid, true);
return 1;
}
if(PiacInfo[fMati] < 100)
{
Msg(playerid, "A gyбrnak nincs elйg alkatrйsze a fegyver цsszerakбsбhoz...");
return 1;
}
GiveMoney(playerid, -5000);
GiveWeapon(playerid, 5, 1);
Cselekves(playerid "vett valamit...");
PiacInfo[fMati] = PiacInfo[fMati] - 100;
format(string, sizeof(string), "Sikeresen vettйl egy baseball ьtőt");
ShowPlayerDialog(playerid, DIALOG_VESZ, DIALOG_STYLE_MSGBOX, "Piac", string, "OK", "Mйgse");
TogglePlayerControllable(playerid, true);
}
}
}
else if(dialogid == DIALOG_PIAC)
{
listitem++;
switch(termekek)
{
case 1;
{
if(GetMoney(playerid) < 10000)
{
format(string, sizeof(string), "Ezt nem tudod kifizetni...");
ShowPlayerDialog(playerid, DIALOG_VESZ, DIALOG_STYLE_MSGBOX, string, "OK", "Mйgse");
TogglePlayerControllable(playerid, true);
return 1;
}
if(PiacInfo[fMati] < 400)
{
Msg(playerid, "A gyбrnak nincs elйg alkatrйsze a fegyver цsszerakбsбhoz...");
return 1;
}
GiveMoney(playerid, -10000);
GiveWeapon(playerid, 24, 150);
Cselekves(playerid "vett valamit...");
PiacInfo[fMati] = PiacInfo[fMati] - 400;
format(string, sizeof(string), "Sikeresen vettйl egy deagle-t");
ShowPlayerDialog(playerid, DIALOG_VESZ, DIALOG_STYLE_MSGBOX, "Piac", string, "OK", "Mйgse");
TogglePlayerControllable(playerid, true);
}
case 2;
{
if(GetMoney(playerid) < 8000)
{
format(string, sizeof(string), "Ezt nem tudod kifizetni...");
ShowPlayerDialog(playerid, DIALOG_VESZ, DIALOG_STYLE_MSGBOX, string, "OK", "Mйgse");
TogglePlayerControllable(playerid, true);
return 1;
}
if(PiacInfo[fMati] < 300)
{
Msg(playerid, "A gyбrnak nincs elйg alkatrйsze a fegyver цsszerakбsбhoz...");
return 1;
}
GiveMoney(playerid, -8000);
GiveWeapon(playerid, 22, 150);
Cselekves(playerid "vett valamit...");
PiacInfo[fMati] = PiacInfo[fMati] - 300;
format(string, sizeof(string), "Sikeresen vettйl egy colt-ot");
ShowPlayerDialog(playerid, DIALOG_VESZ, DIALOG_STYLE_MSGBOX, "Piac", string, "OK", "Mйgse");
TogglePlayerControllable(playerid, true);
}
case 3;
{
if(GetMoney(playerid) < 5000)
{
format(string, sizeof(string), "Ezt nem tudod kifizetni...");
ShowPlayerDialog(playerid, DIALOG_VESZ, DIALOG_STYLE_MSGBOX, string, "OK", "Mйgse");
TogglePlayerControllable(playerid, true);
return 1;
}
if(PiacInfo[fMati] < 100)
{
Msg(playerid, "A gyбrnak nincs elйg alkatrйsze a fegyver цsszerakбsбhoz...");
return 1;
}
GiveMoney(playerid, -5000);
GiveWeapon(playerid, 3, 1);
Cselekves(playerid "vett valamit...");
PiacInfo[fMati] = PiacInfo[fMati] - 300;
format(string, sizeof(string), "Sikeresen vettйl egy gumibotot");
ShowPlayerDialog(playerid, DIALOG_VESZ, DIALOG_STYLE_MSGBOX, "Piac", string, "OK", "Mйgse");
TogglePlayerControllable(playerid, true);
}
case 4;
{
if(GetMoney(playerid) < 3000)
{
format(string, sizeof(string), "Ezt nem tudod kifizetni...");
ShowPlayerDialog(playerid, DIALOG_VESZ, DIALOG_STYLE_MSGBOX, string, "OK", "Mйgse");
TogglePlayerControllable(playerid, true);
return 1;
}
if(PiacInfo[fMati] < 50)
{
Msg(playerid, "A gyбrnak nincs elйg alkatrйsze a fegyver цsszerakбsбhoz...");
return 1;
}
GiveMoney(playerid, -3000);
GiveWeapon(playerid, 4, 1);
Cselekves(playerid "vett valamit...");
PiacInfo[fMati] = PiacInfo[fMati] - 50;
format(string, sizeof(string), "Sikeresen vettйl egy kйst");
ShowPlayerDialog(playerid, DIALOG_VESZ, DIALOG_STYLE_MSGBOX, "Piac", string, "OK", "Mйgse");
TogglePlayerControllable(playerid, true);
}
case 5;
{
if(GetMoney(playerid) < 5000)
{
format(string, sizeof(string), "Ezt nem tudod kifizetni...");
ShowPlayerDialog(playerid, DIALOG_VESZ, DIALOG_STYLE_MSGBOX, string, "OK", "Mйgse");
TogglePlayerControllable(playerid, true);
return 1;
}
if(PiacInfo[fMati] < 100)
{
Msg(playerid, "A gyбrnak nincs elйg alkatrйsze a fegyver цsszerakбsбhoz...");
return 1;
}
GiveMoney(playerid, -5000);
GiveWeapon(playerid, 5, 1);
Cselekves(playerid "vett valamit...");
PiacInfo[fMati] = PiacInfo[fMati] - 100;
format(string, sizeof(string), "Sikeresen vettйl egy baseball ьtőt");
ShowPlayerDialog(playerid, DIALOG_VESZ, DIALOG_STYLE_MSGBOX, "Piac", string, "OK", "Mйgse");
TogglePlayerControllable(playerid, true);
}
}
}