How to get selected player from mysql?
I wanna made a top 5 users with menu_create and if i press on player show custom stats. Example:
I write /top5 i get menu from mysql by points: TOP USERS MENIU 1) USER1 [300 points] 2) USER2 [100 points] 3) USER3 [25 points] And if i press number 1 i get: USER1 STATISTICS 4102 kills 265 deaths 654hs and etc... I have made like this: PHP Code:
|
Re: How to get selected player from mysql?
In your menu handler just make another menu using the info parameter of the first menu passing userid for example
|
Re: How to get selected player from mysql?
Quote:
|
Re: How to get selected player from mysql?
Check out menu_item_getinfo, you are already passing something called position, so you might wanna add something like userid to that string and parse it later, however I don't see you using the position so I don't see the point of it.
Try to make it yourself, I can put you on the right path later :D Also, why is your code not indented ? |
Re: How to get selected player from mysql?
Get also the player's steamid in sqlLoadTop and add it to the item data with menu_additem.
Then in your menu handler, grab that steamid and execute another query. |
| All times are GMT -4. The time now is 12:38. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.