Jump to content
GIGN Forum

Votemap & Mapcycle


Recommended Posts

Sveiki! Man taads jautaajums, vai ir plugins,fails.. nez... kas mapes beigaas taisa votemap un izveelaas mapes nahaljavu kas ir cstrike/maps failaa. Vnk es nevaru taa noliidzinaat mapcycle.txt failaa mapes lai viss buutu labi un lai visiem patiktu...

ceru, ka saprataat ideju :)

Link to comment
Share on other sites

Tātad tu gribi, ka katru mapi nākošo mapi izvēlas pilnīgi random? Nevis noteiktā secībā? Nu tad maybe šis tev noderēs:

#include <amxmodx>

new current_map[33]
public plugin_init() {register_plugin("Mapes nahaljavu x.d","0.7","Sh!nE");choose_map();}

public choose_map() {
    new filename[128],maps[128][33],line_data[33],t_num
    get_mapname(current_map,32)
    
    format(filename,127,"%s/maps.ini")
    
    new file = fopen(filename,"r")
    if(file) {
        while(fgets(file,line_data,32)) {  
            if(line_data[0]!=';' && !equal(line_data,current_map)) {
                copy(maps[t_num],32,line_data)
                t_num++
            }
        }
        set_cvar_string("amx_nextmap",maps[random_num(0,t_num)])
    }
    fclose(file)
}

Neesmu testējis, bet vajadzētu visam iet kā pa sviestu..

EDIT: aizmirsu piebilst, ka tev jānoņem mapchooser.amxx

Edited by shine
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...