Raised This Month: $32 Target: $400
 8% 

SET Team By Steam id


Post New Thread Reply   
 
Thread Tools Display Modes
Natsheh
Veteran Member
Join Date: Sep 2012
Old 06-14-2018 , 06:13   Re: SET Team By Steam id
Reply With Quote #11

Quote:
Originally Posted by soumyadip77 View Post
bro ik.... but i am confused how to make menu from array :/
You do not make sense!
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
CrAzY MaN
Senior Member
Join Date: Mar 2017
Location: India
Old 06-14-2018 , 06:49   Re: SET Team By Steam id
Reply With Quote #12

Quote:
Originally Posted by Natsheh View Post
You do not make sense!
His ENGLISH is weak.
__________________
CrAzY MaN is offline
soumyadip77
Senior Member
Join Date: Jul 2017
Location: INDIA,KOLKATA
Old 06-14-2018 , 09:18   Re: SET Team By Steam id
Reply With Quote #13

Quote:
Originally Posted by CrAzY MaN View Post
His ENGLISH is weak.
can u explain them what i am want to say plzz....
soumyadip77 is offline
Send a message via Skype™ to soumyadip77
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-15-2018 , 22:34   Re: SET Team By Steam id
Reply With Quote #14

Quote:
Originally Posted by soumyadip77 View Post
bro ik.... but i am confused how to make menu from array :/
The error that you have posted is because you didn't learn from the tutorial on how to do menus. It has nothing to do with any arrays. Look at the line the error occurs on and then look at the tutorials and you'll see what is different.
__________________
fysiks is offline
soumyadip77
Senior Member
Join Date: Jul 2017
Location: INDIA,KOLKATA
Old 06-15-2018 , 22:36   Re: SET Team By Steam id
Reply With Quote #15

here me tried and compiled but i have doubt that am i i code properly..

PHP Code:
/* Sublime AMXX Editor v2.2 */

#include <amxmodx>
#include <amxmisc>
// #include <cstrike>
// #include <engine>
// #include <fakemeta>
// #include <hamsandwich>
// #include <fun>
// #include <xs>
// #include <sqlx>

#define PLUGIN  "New Plug-In"
#define VERSION "1.0"
#define AUTHOR  "Author"

#define MAX_MAP 32

new filename164 ];
new 
map_count;
new 
map_menu;
new 
map_namesMAX_MAP ][ MAX_PLAYERS ]


public 
plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR);


    
register_clcmd("say /map""map_change")
    
    
get_configsdir(filename164);
    
format(filename164"%s/special_map.ini"filename);
}

public 
plugin_cfg()
{
    
    if( 
file_existsfilename ) )
    {
        new 
open fopenfilename"rt");
        
        new 
buffer164 ], num10 ];
        
        while( !
feofopen ) && ( map_count MAX_MAP ) )
        {
            
fgetsopenbuffercharsmax(buffer));
            
trim(buffer);
            
            if( !
buffer] || buffer] == ';' || buffer] == '/' && buffer] == '/' && is_map_valid(buffer) )
            {
                continue;
            }

            
copymap_namesmap_count ], charsmaxmap_names[] ), buffer);

            
num_to_strmap_countnumcharsmax(num));
            
menu_additemmap_menumap_namesmap_count ], num);

            
map_count++;
            
        }

        
fcloseopen );

    }

    return 
0;
}


public 
map_changeid )
{
    
map_menu menu_create"Chose map""change" );

    
menu_setpropmap_menuMPROP_EXITMEXIT_NEVER ); 
    
menu_displayidmap_menu ); 

}

public 
changeiditem )
{
    if( 
item == MENU_EXIT )
        return 
PLUGIN_HANDLED

    
new szNameMAX_NAME_LENGTH ]; 
    
get_user_nameidszName31 );

    
client_print(idprint_chat"%s Change Map To  %s"szNamemap_namesid ]);

    return 
1;

soumyadip77 is offline
Send a message via Skype™ to soumyadip77
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-15-2018 , 22:47   Re: SET Team By Steam id
Reply With Quote #16

You should be getting a run-time error because you are attempting to add items to your menu before you create the menu. Move the menu creation (and setprop) into plugin_cfg() so that the menu exists before you add items to it.

Also, you should not be indexing the map_names array with id. I can't fully remember but you might be able to use item. Otherwise, you'll need to do it more like the examples in the tutorial.
__________________
fysiks is offline
maqi
Senior Member
Join Date: Apr 2017
Location: Serbia
Old 06-15-2018 , 22:54   Re: SET Team By Steam id
Reply With Quote #17

Also this doesn't make any sense,
Code:
new map_names[ MAX_MAP ][ MAX_PLAYERS ]
especially because you didn't define MAX_PLAYERS, so there's another error. I don't know how this compiled honestly.

Same goes for
Code:
new szName[ MAX_NAME_LENGTH ];

Apart from those errors, I hope you know that your menu handler is just printing out map names, not changing anything ( Wrong btw, because you are using player index instead of the menu item to index the array )
__________________
stuff

Last edited by maqi; 06-15-2018 at 22:59.
maqi is offline
soumyadip77
Senior Member
Join Date: Jul 2017
Location: INDIA,KOLKATA
Old 06-15-2018 , 23:00   Re: SET Team By Steam id
Reply With Quote #18

its dont show current map..and when i select map its dosenot print map name :/
soumyadip77 is offline
Send a message via Skype™ to soumyadip77
maqi
Senior Member
Join Date: Apr 2017
Location: Serbia
Old 06-15-2018 , 23:01   Re: SET Team By Steam id
Reply With Quote #19

We just told you a bunch of reasons why, fix them, post the renewed code, and then ask again. But i honestly do not know how you compiled at all.
__________________
stuff
maqi is offline
soumyadip77
Senior Member
Join Date: Jul 2017
Location: INDIA,KOLKATA
Old 06-15-2018 , 23:01   Re: SET Team By Steam id
Reply With Quote #20

Quote:
Originally Posted by maqi View Post
Also this doesn't make any sense,
Code:
new map_names[ MAX_MAP ][ MAX_PLAYERS ]
especially because you didn't define MAX_PLAYERS, so there's another error. I don't know how this compiled honestly.

Same goes for
Code:
new szName[ MAX_NAME_LENGTH ];

Apart from those errors, I hope you know that your menu handler is just printing out map names, not changing anything ( Wrong btw, because you are using player index instead of the menu item to index the array )
me use 1.8.3 dev 5154 and its already defined
soumyadip77 is offline
Send a message via Skype™ to soumyadip77
Reply


Thread Tools
Display Modes

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 07:03.


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