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

[HELP] Map Menu [ TUT ]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
soumyadip77
Senior Member
Join Date: Jul 2017
Location: INDIA,KOLKATA
Old 05-14-2018 , 11:10   [HELP] Map Menu [ TUT ]
Reply With Quote #1

Guys how to make a map menu plaugin when i will type in console /maps it will read maps from mapwar.ini and show them in menu and chose map will be chnage to that map........ any onw tell me how to start and how to make .....
soumyadip77 is offline
Send a message via Skype™ to soumyadip77
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 05-14-2018 , 11:28   Re: [HELP] Map Menu [ TUT ]
Reply With Quote #2

How to make menu
https://forums.alliedmods.net/showthread.php?t=46364

How to read from file
https://forums.alliedmods.net/showthread.php?t=133254

Tries
https://forums.alliedmods.net/showthread.php?t=201872

amx_map <mapname>
__________________









Last edited by CrazY.; 05-15-2018 at 07:21. Reason: Applyed DarthMan's suggestion
CrazY. is offline
soumyadip77
Senior Member
Join Date: Jul 2017
Location: INDIA,KOLKATA
Old 05-14-2018 , 11:36   Re: [HELP] Map Menu [ TUT ]
Reply With Quote #3

after read data how to display in menu :/
soumyadip77 is offline
Send a message via Skype™ to soumyadip77
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 05-14-2018 , 12:03   Re: [HELP] Map Menu [ TUT ]
Reply With Quote #4

Split string, store each map name in array. In menu, run a loop, get from array as an string, and show.
__________________








CrazY. is offline
soumyadip77
Senior Member
Join Date: Jul 2017
Location: INDIA,KOLKATA
Old 05-14-2018 , 22:14   Re: [HELP] Map Menu [ TUT ]
Reply With Quote #5

is this code will read this file ?? and how to display this in a menu :/ i want to use arry bt cant under stand how....

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"

new filename164 ];
new 
buffer164 ];

public 
plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR);
    
    
get_configsdir(filename164);
    
format(filename164"%s/matchmap.ini"filename);
}

public 
plugin_cfg()
{
    if( 
file_existsfilename ) )
    {
        new 
open fopenfilename"rt");

        while( !
feofopen ) )
        {
            
fgetsopenbuffercharsmax(buffer));
            
trim(buffer);
        }
    }

soumyadip77 is offline
Send a message via Skype™ to soumyadip77
DarthMan
Veteran Member
Join Date: Aug 2011
Old 05-15-2018 , 04:18   Re: [HELP] Map Menu [ TUT ]
Reply With Quote #6

Quote:
Originally Posted by CrazY. View Post
Split string, store each map name in array. In menu, run a loop, get from array as an string, and show.
I guess trie is better to use in this case. Especially if u have duplicates of the same map in the text file, each valid map will only be added to the trie once. With an array you'd have to loop and check if the map was already added in the array. So TrieSetCell with a value of 1 applied to the mapname is the better way to go by first checking if TrieKeyExists.

Last edited by DarthMan; 05-15-2018 at 04:21.
DarthMan is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 05-15-2018 , 07:19   Re: [HELP] Map Menu [ TUT ]
Reply With Quote #7

Hmm... yes, I agree with you.

@OP, I think you need to learn more about amxx.
https://forums.alliedmods.net/showthread.php?t=172936
__________________









Last edited by CrazY.; 05-15-2018 at 07:23.
CrazY. is offline
soumyadip77
Senior Member
Join Date: Jul 2017
Location: INDIA,KOLKATA
Old 05-15-2018 , 07:59   Re: [HELP] Map Menu [ TUT ]
Reply With Quote #8

I dnt know about ini and all file read functions well
soumyadip77 is offline
Send a message via Skype™ to soumyadip77
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 05-15-2018 , 10:20   Re: [HELP] Map Menu [ TUT ]
Reply With Quote #9

Take a look at amx_settings_api.
__________________








CrazY. is offline
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 03:47.


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