Raised This Month: $ Target: $400
 0% 

random pick of load maps


Post New Thread Closed Thread   
 
Thread Tools Display Modes
Author Message
flamin
BANNED
Join Date: Jul 2009
Location: Los Teques
Old 05-02-2010 , 00:04   random pick of load maps
#1

Hi! As i can achieve a random loaded the maps on the menu?

This is the code:

PHP Code:
public try_load_votemap_menu()
{
    
// Rukia: Get our maps.ini
    
static filename[64]
    
get_configsdirfilename63 )
    
formatfilename63"%s/maps.ini"filename )

    
// Rukia: Otherwise, just use mapcycle
    
if(file_exists(filename)) 
    {
        
load_votemap_menu(filename)
        if(
pug_votemap_count != 0) return;
    }

    
copy(filename,63,"mapcycle.txt")
    
load_votemap_menu(filename)
}

public 
load_votemap_menu(filename[])
{
    new 
szText256 ] , iFile;
    
    
iFile fopenfilename "rt" );
    
    
pug_votemap_count 0;
    
    while( ( 
pug_votemap_count VoteMaps ) && !feofiFile ) && fgetsiFile szText charsmaxszText ) ) )
    {
        
trimszText );
        
        if( ( ( 
szText] == '^0' ) || ( szText] == '/' ) || ( szText] == ';' ) ) || !is_map_validszText ) ) 
            continue;

        
copypug_votemap_namepug_votemap_count ] , charsmaxpug_votemap_name[] ) , szText );

        
g_iMapVotespug_votemap_count ][ MapIndex ] = pug_votemap_count++;

        
menu_additempug_votemap_menu szText )
    }
    
    
fcloseiFile );

I want to load the maps of the file maps.ini not to leave in the same position in which are ordered within the file,If not do that to load the maps are mixed...

Here I leave a screenshot where i want the random, to be more clear...
Attached Thumbnails
Click image for larger version

Name:	maps.JPG
Views:	205
Size:	18.1 KB
ID:	64842  
flamin is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-02-2010 , 04:55   Re: random pick of load maps
#2

See the mapchooser plugin provided by default in amxx.
__________________
Arkshine is offline
flamin
BANNED
Join Date: Jul 2009
Location: Los Teques
Old 05-02-2010 , 19:43   Re: random pick of load maps
#3

I have already revised and i don't see what i want...

What i want is that the load the maps are mixed...

In other words, that the load the maps on the menu is a random.
flamin is offline
Kratos
BANNED
Join Date: May 2010
Old 05-05-2010 , 19:54   Re: random pick of load maps
#4

I have sought this and not get nothing...

@Flamin beam found the answer to this thread?

If it is not as well as could be what we want to accomplish?
Kratos is offline
Old 05-05-2010, 19:57
Kratos
This message has been deleted by Kratos.
flamin
BANNED
Join Date: Jul 2009
Location: Los Teques
Old 05-05-2010 , 20:00   Re: random pick of load maps
#5

@Kratos i did not get the answer to this request...

With your question let us hope that someone will help us...
flamin is offline
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 05-05-2010 , 20:12   Re: random pick of load maps
#6

LOL.
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT
wrecked_ is offline
flamin
BANNED
Join Date: Jul 2009
Location: Los Teques
Old 05-05-2010 , 20:48   Re: random pick of load maps
#7

Quote:
Originally Posted by wrecked_ View Post
LOL.
?

Wrecked you can help me?
flamin is offline
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 05-05-2010 , 20:55   Re: random pick of load maps
#8

Well, it looks like you've evolved to bumping with multiple accounts acting as strangers to one another, but I don't understand your issue. Please explain more.

Also, why are you posting in Scripting Help? This should be in Suggestions & Requests if you're asking people to do your work for you.
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT
wrecked_ is offline
flamin
BANNED
Join Date: Jul 2009
Location: Los Teques
Old 05-05-2010 , 20:59   Re: random pick of load maps
#9

Quote:
Originally Posted by wrecked_ View Post
Well, it looks like you've evolved to bumping with multiple accounts acting as strangers to one another, but I don't understand your issue. Please explain more.

Also, why are you posting in Scripting Help? This should be in Suggestions & Requests if you're asking people to do your work for you.
Your beam that should be in suggestion/request but i am wrong

What i need is that the load the maps are mixed, As saying a random...

What i do not want is that the maps out in the same position as i have maps.ini, That is a random to load the menu selection of maps
flamin is offline
Kratos
BANNED
Join Date: May 2010
Old 05-07-2010 , 19:40   Re: random pick of load maps
#10

Quote:
Originally Posted by flamin View Post
Your beam that should be in suggestion/request but i am wrong

What i need is that the load the maps are mixed, As saying a random...

What i do not want is that the maps out in the same position as i have maps.ini, That is a random to load the menu selection of maps
You have reason wrecked!

@flamin Tapeworms that having published this thread in suggestion/request.

Exactly what it says flamin is what i need to my code, i have been studied about this, but i did not succeed


Wrecked can help a little more please?
Kratos is offline
Closed Thread



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 17:04.


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