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

Deagles' Map Management 3.23


Post New Thread Reply   
 
Thread Tools Display Modes
mosdod
New Member
Join Date: Mar 2010
Old 06-01-2010 , 22:41   Re: Deagles' Map Management 3.23
Reply With Quote #861

How can I turn this of?
When I try to nominate a map after playing it tells me that I can not nominate the last four maps played.

I want to be able to nominate any map no matter of its been played in the last round or not.


Any help is appreciated.
Thanks
__________________
mosdod is offline
craigy09
Senior Member
Join Date: Mar 2010
Old 06-02-2010 , 03:30   Re: Deagles' Map Management 3.23
Reply With Quote #862

dmap_banlastmaps 0
craigy09 is offline
T-z3P
Senior Member
Join Date: Apr 2008
Location: Iasi, Romania
Old 06-05-2010 , 13:39   Re: Deagles' Map Management 3.23
Reply With Quote #863

Hi . Again I have a problem . After the final vote ends , no nextmap is chosen and when the timeleft reach to 0 the server freezes ( it's like mp_chattime is set to infinite , but isn't ) .
Sometimes when I write in chat "nextmap" , it returns "The next map is : <empty - no map here> " .
__________________



Last edited by T-z3P; 06-05-2010 at 14:13.
T-z3P is offline
Send a message via Yahoo to T-z3P Send a message via Skype™ to T-z3P
ghostofmybrain
Veteran Member
Join Date: Mar 2010
Old 06-09-2010 , 18:52   Re: Deagles' Map Management 3.23
Reply With Quote #864

Is there any way to run this with mp_timelimit 0?
ghostofmybrain is offline
kikifrh
Senior Member
Join Date: May 2009
Old 06-09-2010 , 19:14   Re: Deagles' Map Management 3.23
Reply With Quote #865

what is the cvar that freezes u when its going to change the map?
kikifrh is offline
-=hunter=-
Senior Member
Join Date: Jul 2008
Old 06-15-2010 , 04:34   Re: Deagles' Map Management 3.23
Reply With Quote #866

Better to use Trie than arrays when working with map names. Using Trie, plugin will quickly work with the functions such as iscustommap many times faster than with using arrays. This depended on the number of maps. If number of maps is about 850 then functions with using Trie will be executed up to 30 times faster than with using array. If number of maps is about 1-3 then work-time of functions with using Trie and array will be is equal. It follows that in any case should be used Trie.
But adding mapnames in Trie takes is about 3.7 times longer than in array.

Here example which shows work time with Trie and array (for working needed amxmodx profiler):
PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <celltrie>

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

#define MAX_MAPS 3000

new maps[MAX_MAPS][64];
new 
maps_count 0;
new 
Trie:trie;
new 
Profile:start;
new 
Float:stop;

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
set_task(1.0"test");
}

public 
test()
{
    
trie TrieCreate();
    new 
configs_dir[64], maps_file[64];
    
get_configsdir(configs_dir,64);
    
formatex(maps_file,64,"%s/maps.ini",configs_dir);
    
    new 
buffer[64], hFile;    
        
    
// ---------------------------- Adding map in array --------------------------
    
start StartProfile();
    
    
hFile fopen(maps_file,"rt")    
    while (
fgets(hFile,buffer,64))
    {
        
trim(buffer);
        
maps[++maps_count] = buffer;
        
    }
    
fclose(hFile);
    
    
stop StopProfile(start)    
    
server_print("time of adding in array is %f secs",stop);
    
// ---------------------------------------------------------------------------
        
    
    // ---------------------------- Adding map in Trie ---------------------------
    
start StartProfile();
    
    
hFile fopen(maps_file,"rt")
    while (
fgets(hFile,buffer,64))
    {
        
trim(buffer)
        
strtolower(buffer)
        
TrieSetCell(trie,buffer,1);        
        ++
maps_count;
    }
    
fclose(hFile);
    
    
stop StopProfile(start)    
    
server_print("time of adding in Trie is %f secs",stop);
    
// ---------------------------------------------------------------------------    
    
    
    
new mapname[64] = "aK_rh_warehouse_ns";    // <- type here mapname in maps.ini
    
    // --------------------------- Searching map in Array ------------------------
    
start StartProfile();
    
    for (new 
i=1i<=maps_count;i++)
    {
        if (
equali(maps[i],mapname)) break;
    }
    
    
stop StopProfile(start)    
    
server_print("time of finding map in array is %f secs",stop);
    
// ---------------------------------------------------------------------------
        
    
    // ----------------------------- Searching map in Trie -----------------------
    
start StartProfile();
    
    
strtolower(mapname)
    new 
bool:fmap TrieKeyExists(trie,mapname);
    
    
stop StopProfile(start)    
    
server_print("time of finding map in Trie is %f secs",stop);
    
    if (
fmapserver_print("%s","MAP IS FOUND")
    else 
server_print("%s","MAP NOT FOUND")
    
    
// ---------------------------------------------------------------------------
}

public 
plugin_end()
{
    
TrieDestroy(trie);    

Also, is not a good idea to use read_file and read_dir (are very slow). Better to use fopen, fgets, fclose for reading file and open_dir, next_file, close_fir for finding files in directory.

P.S. Sorry for my english. I dont know where to find a good manual on syntax of English.

Last edited by -=hunter=-; 06-15-2010 at 21:51.
-=hunter=- is offline
Send a message via ICQ to -=hunter=- Send a message via Skype™ to -=hunter=-
-=hunter=-
Senior Member
Join Date: Jul 2008
Old 06-18-2010 , 10:50   Re: Deagles' Map Management 3.23
Reply With Quote #867

I think first of all need to solve the problem with the lags of server. I found one of the functions due to there is a lag. I do not understand why function available_maps so looks:
PHP Code:
available_maps() {    //return number of maps that havent that have been added yet
    
new num 0isinlist;
    new 
current_map[32], ai;
    
get_mapname(current_map31);
    for (
0num_nmapsfilla++) {
        if (
is_map_valid(nmapsfill[a])) {
            
isinlist 0;
            for (
0nmaps_numi++) {
                if (
equali(nmapsfill[a], nmaps[i])) {
                    
isinlist 1;
                }
            }
            if (!
isinlist) {
                
num++;
            }
        }
    }
    return 
num;

When you can do so here:
PHP Code:
available_maps()
{
    return (
num_nmapsfill nmaps_num);

Also I would suggest to look on my previous post.
-=hunter=- is offline
Send a message via ICQ to -=hunter=- Send a message via Skype™ to -=hunter=-
sphott
Member
Join Date: May 2010
Old 07-17-2010 , 06:32   Re: Deagles' Map Management 3.23
Reply With Quote #868

I have made a little change on this plugin.
It is simple. When nobody voted or the server is empty, the plugin will random choose a map, from the list from the screen, and not change to the default nextmap.
I've just don't know it works ok or not... because I didn't know this plugin well.

PHP Code:
line 602
public check_votes() {
    new 
timeleft get_timeleft();
    new 
0a;
    for (
0nmapstoch; ++a) {
        if (
nvotes[b] < nvotes[a]) {
            
a;
        }
    }
    if(
nvotes[b]==0){
        
b=random_num(0,get_cvar_num("dmap_mapsnum"));
        
nvotes[b]++;
    }
    if (
nvotes[maps_to_select] > nvotes[b]) {
....... 
PHP Code:
    for (1nmapstoch; ++a) { 
__________________

SilenceGaming.com - [HUN] Neptune 79.172.211.29:27019
AIM/FFA CSDM





Last edited by sphott; 07-17-2010 at 14:44.
sphott is offline
clowntrick
Junior Member
Join Date: Apr 2010
Old 07-26-2010 , 16:34   Re: Deagles' Map Management 3.23
Reply With Quote #869

How do I make it so, we can nominate past maps. Because now it says you cannot nominate a map that has been played last 4 rounds?

Thanks

Last edited by clowntrick; 07-26-2010 at 16:38.
clowntrick is offline
sphott
Member
Join Date: May 2010
Old 07-26-2010 , 19:30   Re: Deagles' Map Management 3.23
Reply With Quote #870

Quote:
Originally Posted by clowntrick View Post
How do I make it so, we can nominate past maps. Because now it says you cannot nominate a map that has been played last 4 rounds?

Thanks
read the post!

dmap_banlastmaps 4 // ban last 4 maps
dmap_banlastmaps 0 // that is what you need ;-D
__________________

SilenceGaming.com - [HUN] Neptune 79.172.211.29:27019
AIM/FFA CSDM




sphott 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 06:07.


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