Thread: Mapchooser4
View Single Post
James
Senior Member
Join Date: Dec 2004
Old 01-08-2007 , 15:24   Re: correct patch?
Reply With Quote #25

Patch for more HLDS's from one Directory (I hope this will be correct way ;) )


Search
Code:
new Float:amx_ext_count = 0.0
After add
Code:
new hostname[64]
Search
Code:
get_configsdir(g_maphistFile,63)
After add
Code:
get_cvar_string("hostname",hostname,63)
replace_all(hostname,63,"/","-")
replace_all(hostname,63,"\","-")
replace_all(hostname,63,":","-")
replace_all(hostname,63,"*","-")
replace_all(hostname,63,"?","-")
replace_all(hostname,63,">","-")
replace_all(hostname,63,"<","-")
replace_all(hostname,63,"|","-")
Search
Code:
format(g_maphistFile, 63, "%s/maphist.ini", g_maphistFile)
Replace with:
Code:
format(g_maphistFile, 63, "%s/mapchooser/%s",g_maphistFile,hostname)
  if (!dir_exists(g_maphistFile))
    mkdir(g_maphistFile)
	
format(g_maphistFile, 63, "%s/maphist.ini", g_maphistFile)
Attached Files
File Type: sma Get Plugin or Get Source (mapchooser4.sma - 1315 views - 15.0 KB)

Last edited by James; 01-16-2007 at 16:05.
James is offline