exec mods 1

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
Green Beret
Major General
Posts: 746
Joined: Mon Apr 19, 2004 12:21 pm
Contact:

exec mods 1

Post by Green Beret »

I searched n searched n searched, And couldnt find it, But i know i seen it here.
How would i exec my mods by typing in a console command
IE... mods 1 , Then hit enter, Then restart, And bam mods are in.
And to take them back off, mods 0 , Then hit enter, Restart, And there off?

Code: Select all


if(level.gbmods == "1")
{
thread greensfix
}
end
level waittill spawn

if (level.gbmods == "0")
end
level.mapname = getcvar (mapname)

	switch ( level.mapname )
	{
	  case "dm/mohdm1":
		{
//Southern France...mods here
		}
end
Image
User avatar
ViPER
General
Posts: 1058
Joined: Fri Jan 14, 2005 5:48 pm
Location: California
Contact:

Post by ViPER »

in your map script get your cvar and thread your mod from it -

Code: Select all

if(int(getcvar mymod) == 1)
       thread mymod_thread
Green Beret
Major General
Posts: 746
Joined: Mon Apr 19, 2004 12:21 pm
Contact:

Post by Green Beret »

Thank you, And i found the old post, I think it was one of your post actually :P
Image
User avatar
ViPER
General
Posts: 1058
Joined: Fri Jan 14, 2005 5:48 pm
Location: California
Contact:

Post by ViPER »

maybe these? i run two spearhead servers with dynamic mod switching that bdbodger helped me set up- over a hundred mods in rotation and i have some mods that are selected depending on how many people are on the server at end of previous map.

ill be gone - but will be back in a bit and will help anybody who is interested in setting this up themselves

http://dynamic.gamespy.com/~map/mohaa/f ... highlight=

http://dynamic.gamespy.com/~map/mohaa/f ... highlight=
Green Beret
Major General
Posts: 746
Joined: Mon Apr 19, 2004 12:21 pm
Contact:

Post by Green Beret »

EDIT*

I finally figured it out :wink:
Image
Post Reply