Page 1 of 1

Idea for orc nades/map protection

Posted: Thu Jul 13, 2006 1:31 pm
by Overkill
I saw in the other.inl file how to set up the no gloves/orc nades thing based on the prefix of the map or the map name. I have no programming experience, but I want to make the mod read the affected maps from a file, rather than having to put 20-30 entries into the inl. (I have approx. infinity custom maps with random names, so I can't put something in the inl file to fix it)

Also, do I need to recompile after I change the inl?

Thanks
-Overkill

Posted: Thu Jul 13, 2006 1:35 pm
by YamiKaitou
yes, you have to recompile it everytime you change the sma file or any included files

Posted: Thu Jul 13, 2006 1:48 pm
by Overkill
Sweet...now I hope I don't mess up somehow and get one of these compile errors I keep hearing about =)

Still waiting for support on my first issue though...

-Overkill

Posted: Fri Jul 14, 2006 10:48 am
by Krazy
In the next version 3.0 there is a .cfg file where you can put the maps in that you want to disable orc nades or gloves. So I would just wait for that version. In 2.3.2 you can edit the other.inl and add the maps you want to disable orc nades and gloves on.

Example of what mine looks like now:

Code: Select all

#if MOD ==0
		new mapname[32]
		get_mapname(mapname,31) 
		if (containi(mapname,"aim_")!=-1 || containi(mapname,"fy_")!=-1 || containi(mapname,"awp_")!=-1 || containi(mapname,"scout")!=-1 || containi(mapname,"cs_p90")!=-1 || containi(mapname,"cs_blitztowers")!=-1 || containi(mapname,"bok_")!=-1 || containi(mapname,"cs_deagle5")!=-1){
			g_givePistol=false
			if (iCvar[FT_NO_GLOVES_ON_KA])
				g_giveHE=false
			else
				g_giveHE=true
		}
		else{
			g_giveHE=true
			g_givePistol=true
		}
		if(iCvar[FT_NO_ORCNADES]){
			if (containi(mapname,"aim_")!=-1 || containi(mapname,"fy_")!=-1 || containi(mapname,"awp_")!=-1 || containi(mapname,"scout")!=-1 || containi(mapname,"cs_p90")!=-1 || containi(mapname,"cs_blitztowers")!=-1 || containi(mapname,"de_westwood")!=-1 || containi(mapname,"playground")!=-1) 
				g_notAllowHE=true
			else
				g_notAllowHE=false
		}
	#endif

Posted: Fri Jul 14, 2006 10:52 am
by Geesu
Use war3ft 3.0 which is in the CVS and u can just type the maps in a file :P

Posted: Sat Jul 15, 2006 11:09 pm
by Overkill
Thanks geesu =) you were already a step ahead of me...
now, can i just enter prefixes in the config file in 3.0, or do i have to do each map? no biggie cuz all i have to do is use winblows' dir command to dump the files to a list, but it'd be nice...

aim_*
awp_*
fy_*
// this is where i'd put ka if CS *WAS* a first person kniver, not a first person shooter. my server is ka-free! woot!
cs_deagle5
cs_cock

something like that? :P

I'm a noob, im just gunna wait for you to officially release 3.0 or for someone to write a tutorial on how to compile it and such and post it here. i'm a lazy bastard like that. oh and props on the new BM ulti, me likey make things go boom!