AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How I Can Make a Mapsmenu in a ini file? (https://forums.alliedmods.net/showthread.php?t=128188)

#8 SickneSS 05-29-2010 17:40

How I Can Make a Mapsmenu in a ini file?
 
I Don't know how :P

ÜnLoCo 05-29-2010 17:55

Re: How I Can Make a Mapsmenu in a ini file?
 
what d'ya wanna do ! what is the mapsmenu for ?

#8 SickneSS 05-29-2010 17:58

Re: How I Can Make a Mapsmenu in a ini file?
 
MixMaker

fysiks 05-29-2010 22:41

Re: How I Can Make a Mapsmenu in a ini file?
 
If this is supposed to be in scripting help then start making the plugin first. If this should be in the requests section then you need to explain exactly what you want. Be SPECIFIC!!!

If it is the latter, then this thread needs moved.

#8 SickneSS 05-29-2010 22:51

Re: How I Can Make a Mapsmenu in a ini file?
 
I just want to know the methods, no to do it for me

EDIT: I Know how to make all ecept how to read the file.

joropito 05-29-2010 23:22

Re: How I Can Make a Mapsmenu in a ini file?
 
Quote:

Originally Posted by #8 SickneSS (Post 1194885)
I just want to know the methods, no to do it for me

EDIT: I Know how to make all ecept how to read the file.

Start reading the manual of file functions

http://www.amxmodx.org/funcwiki.php?go=inc&id=3

Then try to understand how it's done in other plugins (like mapchooser)

fysiks 05-29-2010 23:51

Re: How I Can Make a Mapsmenu in a ini file?
 
When ever I consider making a plugin like this I always start without doing any file functions. Everything is hardcoded into a const. Get the menu working with the const first. THEN and only then I add the file reading. This way you know that you have something that works before you start screwing with files and makes it much easier to debug.

You can look at my bot apology plugin (in my sig) to see how simple file reading works.

#8 SickneSS 05-30-2010 00:09

Re: How I Can Make a Mapsmenu in a ini file?
 
Ok,Thanks,I have made some files,but none read a file,I know how to make all (with const,loops,etc) but no how to read...:P..Thanks fysiks78 :E

EDIT : I don't find how because I don't know how to set the item in the menu,im ussing a loop

example
PHP Code:

#define MAPS 32
new const maps[MAPS][] = "mm-maps.ini" 

//Init
     //Command to open menu

//Function

public func(id) {

           new 
path[64]
           
get_configsdir(path,63)
           
format(path,63,"%s/%s",path,maps)

           new 
menu menu_create("ASd","123")
    
           for(new 
0;<= MAPS;i++)
           {
                     
q[?_?]p
           
}
      
            
menu_display(id,menu)
            return 
PLUGIN_HANDLED
}

/* etc */ 

If someone wants to make it for me,i will appreciate.

fysiks 05-30-2010 03:21

Re: How I Can Make a Mapsmenu in a ini file?
 
Quote:

Originally Posted by #8 SickneSS (Post 1194908)
I know how to make all (with const,loops,etc)

Your code proves this is untrue.

#8 SickneSS 05-30-2010 03:28

Re: How I Can Make a Mapsmenu in a ini file?
 
Quote:

Originally Posted by fysiks (Post 1194980)
Your code proves this is untrue.

Ok,I just think that because when I use a const with the maps in that const i need to use a loop.


All times are GMT -4. The time now is 05:25.

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