Jump to content
GIGN Forum

[plugins] More Prev Maps


Recommended Posts

More Previous Maps

0.7

Gribeeju jau likt topika, ko taisiija "Billabong", bet taakaa vinju sleedza... jataisa pasham jauns. Vakar jau iesaaku taisiit un shodien pa dazhaam min pabeidzu. Vienkarshi sakot rakstot chataa "/prevmaps", tu redzeesi peedeejaas 3 speletaas mapes. Cik esmu dzirdeejis vairaakiem shaads plugins bija vajadziigs, un nedomaaju, ka taads veel ir. Nu vismaz amxmodx.org pie approved vinju neatradu. So...:

#include <amxmodx>

#include <amxmisc>

new filen[128]

public plugin_init() {

register_plugin("More Prev Maps","0.7","Sh!nE*")

register_clcmd("say /prevmaps","show_maps")

register_clcmd("say_team /prevmaps","show_maps")

get_configsdir(filen,255)

format(filen,255,"%s/prevmaps.txt",filen)

}

public show_maps(id) {

new file = fopen(filen,"r")

if(file) {

new alldata[128],maps[3][32]

fgets(file,alldata,127)

parse(alldata,maps[0],31,maps[1],31,maps[2],31)

if(equali(maps[0][2],"")) format(maps[0],31,"No Prev Maps")

client_print(id,print_chat,"[PrevMaps] %s %s %s",maps[0],maps[1],maps[2])

fclose(file)

return PLUGIN_HANDLED

}

return PLUGIN_CONTINUE

}

public plugin_end() {

new map[33],newdata[128],olddata[128]

get_mapname(map,32)

new file = fopen(filen,"r+")

if(file) {

fgets(file,olddata,127)

format(newdata,127,"%s %s",map,olddata)

fseek(file,0,SEEK_SET)

fputs(file,newdata)

fclose(file)

}

}

Edited by shine
Link to comment
Share on other sites

uj XD es to uz aatro pieliku. izlaboju.

EDIT: Ieliec saveejo. Gribu vienu lietu apskatiities :). Kaa tu panaci, ka vinjsh raada saakot ar pedejo mapi nevis vica versa.

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...