11.07.2009, 19:57
Ok, I have a small problem this time guys, I would be happy if you could help me. I've read on wiki how to create a menu and everything went fine- and now it's created and located in the bank checkpoint. I wanted to create a menu where you have "Deposit" and "Withdraw" functions so when I open this, that another menu opens where you can select 1, 10 , 100, 1000, 100000 money, like how mutch you want to withdraw or deposit (just like on Littlewhiteys but without Depositall and Withdrawall functions). So the thing is that I didn't know how to create "menus-in-menu" thing so I've created 3 menus- 1st where's the main menu and you can see deposit/withdraw function, now when the user types shift on one of those, a menu pops up with those numbers 1, 10... I've used this cmd as I didn't know what to do CallLocalFunction("OnPlayerCommandText", "is", playerid, "/depositmenu"); for example now when I click shift on deposit now opens the another new Deposit menu.
So the whole thing of these is that I've made everything as in wiki and forums said, to freeze and unfreeze player when he enters/exits the menu, but the point is that he is freezed at the main bank menu (where you can see deposit and withdraw) but when I click shift on on one of those two, my character gets unfreezed, but I have called the command that he should be freezed at that (deposit or withdraw) menu too. I have also called a command that when I leave the main menu that he doesnt get unfreezed- actually i have tried every combination. So guys please help me, I want that my character doesn't get unfreezed when I click on one of this options (deposit/withdraw)
Here is a peace of my code, if you need anything else I'll post it:
BTW: Sorry guys that I wrote so much, but I always write so much so you can get the full info what I meant and so you can understand, so please don't be lazy to read... I always write so much
So the whole thing of these is that I've made everything as in wiki and forums said, to freeze and unfreeze player when he enters/exits the menu, but the point is that he is freezed at the main bank menu (where you can see deposit and withdraw) but when I click shift on on one of those two, my character gets unfreezed, but I have called the command that he should be freezed at that (deposit or withdraw) menu too. I have also called a command that when I leave the main menu that he doesnt get unfreezed- actually i have tried every combination. So guys please help me, I want that my character doesn't get unfreezed when I click on one of this options (deposit/withdraw)
Here is a peace of my code, if you need anything else I'll post it:
Код:
//=============================Bank Menu======================================== public OnPlayerSelectedMenuRow(playerid, row) { new Menu:current; current = GetPlayerMenu(playerid); if(current == depositmenu) { switch(row) { case 0: { CallLocalFunction("OnPlayerCommandText", "is", playerid, "/deposit 1"); CallLocalFunction("OnPlayerCommandText", "is", playerid, "/menu1"); } case 1: { CallLocalFunction("OnPlayerCommandText", "is", playerid, "/deposit 10"); CallLocalFunction("OnPlayerCommandText", "is", playerid, "/menu1"); } case 2: { CallLocalFunction("OnPlayerCommandText", "is", playerid, "/deposit 100"); CallLocalFunction("OnPlayerCommandText", "is", playerid, "/menu1"); } case 3: { CallLocalFunction("OnPlayerCommandText", "is", playerid, "/deposit 1000"); CallLocalFunction("OnPlayerCommandText", "is", playerid, "/menu1"); } case 4: { CallLocalFunction("OnPlayerCommandText", "is", playerid, "/deposit 10000"); CallLocalFunction("OnPlayerCommandText", "is", playerid, "/menu1"); } case 5: { CallLocalFunction("OnPlayerCommandText", "is", playerid, "/deposit 100000"); CallLocalFunction("OnPlayerCommandText", "is", playerid, "/menu1"); } } } if(current == withdrawmenu) { switch(row) { case 0: { CallLocalFunction("OnPlayerCommandText", "is", playerid, "/withdraw 1"); CallLocalFunction("OnPlayerCommandText", "is", playerid, "/menu2"); } case 1: { CallLocalFunction("OnPlayerCommandText", "is", playerid, "/withdraw 10"); CallLocalFunction("OnPlayerCommandText", "is", playerid, "/menu2"); } case 2: { CallLocalFunction("OnPlayerCommandText", "is", playerid, "/withdraw 100"); CallLocalFunction("OnPlayerCommandText", "is", playerid, "/menu2"); } case 3: { CallLocalFunction("OnPlayerCommandText", "is", playerid, "/withdraw 1000"); CallLocalFunction("OnPlayerCommandText", "is", playerid, "/menu2"); } case 4: { CallLocalFunction("OnPlayerCommandText", "is", playerid, "/withdraw 10000"); CallLocalFunction("OnPlayerCommandText", "is", playerid, "/menu2"); } case 5: { CallLocalFunction("OnPlayerCommandText", "is", playerid, "/withdraw 100000"); CallLocalFunction("OnPlayerCommandText", "is", playerid, "/menu2"); } } } if(current == bankmenu) { switch(row) { case 0: { CallLocalFunction("OnPlayerCommandText", "is", playerid, "/menu1"); } case 1: { CallLocalFunction("OnPlayerCommandText", "is", playerid, "/menu2"); } } } return 1; }
