playermenu help
hi there.
I start making a menu that listen all players on the server. After a player on the menu is choosen a submenu open (which is not fully included here) where the submenu show some amounts ( 5, 10, 20, 50, 100 ) My problem is: I cant hold the id (in my code the var: tempid) of the player I choose in the menu through to the submenu. PHP Code:
|
Re: playermenu help
Quote:
You have to pass the ID as part of the data, which is the third parameter. |
Re: playermenu help
I think that part of data is needed to catch which menu item a player selectet :o or am I wrong?
Anyway Ive tried with a global variable that hold every menu choice for every player. And the menu just works fine :) thanks andy :crab: |
Re: playermenu help
As data is an array, you can pass whatever you want and split it later.
You're welcome 8) |
Re: playermenu help
i acutally have no idea what it is you want.. but there is a section on here that explains menus pretty good. you should look into that.
|
Re: playermenu help
Quote:
But I dont get how to use this. For example I want to pass 3 things data[0] = id data[1] = name data[2] = steamid Could you or someone else give me a quick example please? :shock: |
Re: playermenu help
Creating a global variable that holds the index of the selected player is also a valid option.
Code:
|
Re: playermenu help
see post #3. Im Just interest how to script the other way :)
Quote:
|
Re: playermenu help
Quote:
I'm not entirely sure if data can be passed as an array in menu_additem, most likely not. You can try it out if you want to however. EDIT: It can be passed as a long string however. |
Re: playermenu help
Ive got confused first but now I think I can use it thx. Forgot Scooter's advice tho ;)
|
| All times are GMT -4. The time now is 19:36. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.