[HELP] Menu on new round - works only once
Plugin requested here - https://forums.alliedmods.net/showthread.php?t=241336
Hey all! Again, I've wondering about this for hours, and no solution appeared in my head. I couldn't get that strange problem and what is it cause by, so I hope you will know. Here what's the matter. In this code, everything is OK but only for the first round. The strange is, that in other rounds the menu still appears, but no functions from it. And I think - if the handler is wrong, it should not work event the first time. But it works for the first round - and then, nothing. Here is the code, I think it could be cause by the loop trough players in the new round event. Any ideas? PHP Code:
|
Re: [HELP] Menu on new round - works only once
I ever experienced the same problem with you in my vote kick plugin. Try to remove this:
PHP Code:
|
Re: [HELP] Menu on new round - works only once
You should use get_players or spawn :D
PS: Hey ^_^ |
Re: [HELP] Menu on new round - works only once
Allright, it worked. Thanks! But, I've never had problem with this one, I even know, that it needs to be there, because sometimes the menues fu*k up and choose random item, if this check is not there. Strange... Can someone explain something more about this problem?
EDIT: To response on nicko's post. Allright, after I read up all the sh*t about these loops, I've decided, that I will folow exolent's method. Because in one thread, he explained something like this is the best way, but I couldn find it right now. So, is this really the best way and is there any better way to loop trough all connnected players on the moment? |
Re: [HELP] Menu on new round - works only once
See, menu index is the same to all players, so when one player destroy it, the menu will be destroyed. Other players can't choose because it already destroyed :3
PHP Code:
|
Re: [HELP] Menu on new round - works only once
Isn't the menu separate for each of the players (for i = 1, to maxplayers). Also, I tried this at my own, all alone and noone in the server. Do you think this is the really problem?
|
Re: [HELP] Menu on new round - works only once
No, because your variable
PHP Code:
You can make it like this I guess: PHP Code:
|
Re: [HELP] Menu on new round - works only once
Quote:
There's no needs for array. To OP: PHP Code:
PHP Code:
Magic right? |
Re: [HELP] Menu on new round - works only once
Wut, wut, dafuq wut. :D :D Didn't see that, I'm such a dumbf*ck... God, could anyone delete this thread? Thanks, Dare Devil, for that note, I was never gonna get it.
|
| All times are GMT -4. The time now is 09:40. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.