another menu bug
#1

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;
}
}
}
}
Reply
#2

iBUMP!
Reply
#3

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....
}
Reply
#4

can you explain me,what did you do?cause i want to learn from my mistakes
EDIT:got it,thanks anyways:P
Reply


Forum Jump:


Users browsing this thread: