View Single Post
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 01-04-2017 , 16:45   Re: The menu doesn't update for every player
Reply With Quote #4

Of course you should be able to learn without being talked down to. I see what you wanted to create with the code. And you're not so far away from it being complete.

The thing with updating player menus is that they can change at any time. And you don't want to press the wrong player by mistake.
I would use an old menu in this case. Otherwise you can't update it without setting the page to the first again.
The whole point of the new menu style is that you create it once and get a feedback when completed. That's not what you are after. You're trying to create a more dynamic menu.
You need to consider players leaving, and others taking their place with a new UID.
A perfect menu would take all of these things into account.

I made an example that you can test alone. It will simulate players and them leaving.
I made comments throughout so you'd be able to understand what's going on.
When you're done testing, replace all the functions that end with _debug with the original ones.

Unfortunately these things might appear complicated to a beginner so I don't think I would've been able to nudge you in the right direction. That's why I created the whole thing instead.
If you have questions, please ask.

main plugin

debug.inc
__________________

Last edited by Black Rose; 01-04-2017 at 16:56.
Black Rose is offline