another menu bug - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: another menu bug (
/showthread.php?tid=140723)
another menu bug -
WardenCS - 10.04.2010
Hey,my menu wont work again,i made another but if i click on them,they wont work,nothing wont do.
Код:
if(CurrentMenu == Buy)
{
switch(row)
{
case 0:
{
if (PlayerInfo[playerid][MathBook] && GetPlayerMoney(200))
{
new string[256];
SendClientMessage(playerid, COLOR_GRAD5, "You bought an Math Book");
SendClientMessage(playerid, COLOR_WHITE, "HINT: /bookhelp for help.");
format(string, sizeof(string), "~r~-$200");
GameTextForPlayer(playerid, string, 5000, 1);
GivePlayerMoney(playerid,-200);
TogglePlayerControllable(playerid, 1);
PlayerInfo[playerid][MathBook] = 1;
OnPlayerUpdateX(playerid);
}
}
case 1:
{
if (PlayerInfo[playerid][EngBook] && GetPlayerMoney(200))
{
new string[256];
SendClientMessage(playerid, COLOR_GRAD5, "You bought an English Book");
SendClientMessage(playerid, COLOR_WHITE, "HINT: /bookhelp for help.");
format(string, sizeof(string), "~r~-$200");
GameTextForPlayer(playerid, string, 5000, 1);
GivePlayerMoney(playerid,-200);
TogglePlayerControllable(playerid, 1);
PlayerInfo[playerid][EngBook] = 1;
OnPlayerUpdateX(playerid);
}
}
case 2:
{
if (PlayerInfo[playerid][BioBook] && GetPlayerMoney(200))
{
new string[256];
SendClientMessage(playerid, COLOR_GRAD5, "You bought an Biology Book");
SendClientMessage(playerid, COLOR_WHITE, "HINT: /bookhelp for help.");
format(string, sizeof(string), "~r~-$200");
GameTextForPlayer(playerid, string, 5000, 1);
GivePlayerMoney(playerid,-200);
TogglePlayerControllable(playerid, 1);
PlayerInfo[playerid][BioBook] = 1;
OnPlayerUpdateX(playerid);
}
return 1;
}
}
}
}
Re: another menu bug -
WardenCS - 10.04.2010
iBUMP!
Re: another menu bug -
whitedragon - 10.04.2010
pawn Код:
if(CurrentMenu == Buy)
{
switch(row)
{
case 0:
{
if (PlayerInfo[playerid][MathBook]==0 && GetPlayerMoney(playerid) <=200)
{
new string[256];
SendClientMessage(playerid, COLOR_GRAD5, "You bought an Math Book");
SendClientMessage(playerid, COLOR_WHITE, "HINT: /bookhelp for help.");
format(string, sizeof(string), "~r~-$200");
GameTextForPlayer(playerid, string, 5000, 1);
GivePlayerMoney(playerid,-200);
TogglePlayerControllable(playerid, 1);
PlayerInfo[playerid][MathBook] = 1;
OnPlayerUpdateX(playerid);
}
//so on....
}
Re: another menu bug -
WardenCS - 10.04.2010
can you explain me,what did you do?cause i want to learn from my mistakes
EDIT:got it,thanks anyways:P