Raised This Month: $51 Target: $400
 12% 

Menu not always shows to some players


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
fcastro16
Member
Join Date: Mar 2009
Old 03-29-2016 , 23:16   Menu not always shows to some players
Reply With Quote #1

What can cause a menu not to show every time it's called like this?

This code should display a menu to all players, but it doesn't show to some people.

PHP Code:
for(new id 1id <= g_iMaxPlayersid++)
{
       if(!
is_user_connected(id))
             return 
PLUGIN_HANDLED;
        
       
startBets_Menu(id)  //show menu

thanks

EDIT: I figured it out. I used "return PLUGIN_HANDLED;" instead of "continue;" in the loop. I don't know how I missed that.

Last edited by fcastro16; 03-30-2016 at 01:45.
fcastro16 is offline
Spirit_12
Veteran Member
Join Date: Dec 2012
Location: Toronto, CA
Old 03-29-2016 , 23:42   Re: Menu not always shows to some players
Reply With Quote #2

Doesn't amx uses 0 to 31 index? You are using 1 to 32.
__________________
Spirit_12 is offline
fcastro16
Member
Join Date: Mar 2009
Old 03-30-2016 , 01:01   Re: Menu not always shows to some players
Reply With Quote #3

I'm pretty sure it goes from 1 - 32. Anyways, that's not the problem.
fcastro16 is offline
Artifact
Veteran Member
Join Date: Jul 2010
Old 03-30-2016 , 06:24   Re: Menu not always shows to some players
Reply With Quote #4

Paste ur code, I think there is no problem
__________________
Artifact is offline
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 03-30-2016 , 06:28   Re: Menu not always shows to some players
Reply With Quote #5

0 is not a player, it's the server. He did correct the loop.
siriusmd99 is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 03-30-2016 , 20:02   Re: Menu not always shows to some players
Reply With Quote #6

PHP Code:
new players[32], inum,all
get_players
(players,inum,"h")

for(new 
0;i<inum;i++)
{
all players[i]
startBets_Menu(all)

__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 03-31-2016 , 01:34   Re: Menu not always shows to some players
Reply With Quote #7

You don't have to use "all" because you use players[I] once. just put start_menu(players[i]).
siriusmd99 is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 03-31-2016 , 16:38   Re: Menu not always shows to some players
Reply With Quote #8

Its for show the menu not for the best code format
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 00:37.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode