Anticamper mod

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
agentmad007
Brigadier General
Posts: 570
Joined: Tue Feb 24, 2004 3:52 pm

Anticamper mod

Post by agentmad007 »

Hi there ,

i know that a mod Developed by Elgan Sayer exist already.Took it on

http://www.mods-r-us.net

Bu it dont work for Moh bt something worn on the script ?

Code: Select all

/*

mohaa Anti Camper Mod
To use:
just put it inside your main folder and it should wokr with all maps (maybe not some maps with edited movement)


Developed by Elgan Sayer
e-mail : Elgansayer@hotmail.com
why?..because virus said it would be cool
-------------------
this is free to use and pass arround.
----
What it does?:
After waiting 30 seconds if you are still near where you were standing before or crouching you will have a bom attached to your arm then a timer will count down to 0 from 10 and bang!
*/







main:

	if(level.setup!=1)
	{
		setcvar "camper_silent" "0"
		setcvar "camper_box" "( -10 -10 -10 ) ( 10 10 10 )"
		setcvar "camper_time" "30"
		setcvar "camper_ticktime" "10"
		setcvar "camper_inform" "0"
		level.setup=1
	}


	local.player=self

	if(local.player.trigger!=1)
	{
		local.player.trigger=1
	
		local.master = spawn ScriptMaster
		local.master aliascache bombtick1 sound/items/Item_Timer_01.wav soundparms 0.7 0.0 1.0 0.0 10000 10000 local loaded maps "m1l2a m2 m3 m4l3 m5 m6l1 m6l3d dm moh obj train"
	

	}
	else
	{
		end
	}

	local.still = spawn trigger_multiple 
	local.still.origin = self.origin

	local.box_size = getcvar "camper_box" 

	local.still setsize local.box_size

	local.pladsen = getcvar "camper_time" 
	local.pladsen = int local.pladsen

	for(local.timer=0;local.timer<local.pladsen;local.timer++)
	{
		if!(self istouching local.still)
		{	
			
			local.player.trigger=0
			local.still delete
			end
		}

	wait 1
	}

	local.player.trigger=0
	local.still delete

	local.mine = spawn script_model 
	local.mine model "items/explosive.tik"
	local.mine.origin = ( local.player gettagposition "Bip01 R Forearm")//local.player.origin//
	local.mine notsolid

	local.inform = getcvar "camper_inform"
	local.inform = int local.inform
	
	if(local.inform==1)
	{
		self iprint "You Were Camping"
	}

	local.mine attach local.player "Bip01 R Forearm" 

	local.cute = getcvar "camper_ticktime"
	local.cute  = int local.cute 

	local.player stopwatch local.cute 

	local.linn = getcvar "camper_silent" 
	local.linn  = int local.linn 
	
	if(local.linn==0)
	{
		self loopsound bombtick1
	}

	local.timer=0
	while(isalive self)
	{
		wait 1
	local.timer++
			if(local.timer==local.cute)
		{
			self stoploopsound bombtick1
			local.Exp1 = spawn "fx/scriptbazookaexplosion.tik"
			local.Exp2 = spawn "animate/fx_mortar_dirt.tik"
			local.mine remove
			local.Exp1.origin = local.mine.origin
			local.Exp1 anim start
			local.Exp2.origin = local.mine.origin
			local.Exp2 anim start
			wait 1
			local.Exp1 remove
			local.Exp2 remove
			local.player.trigger=0
		}

		if(local.player.dmteam=="spectator")
		{
			self stoploopsound bombtick1
			local.mine remove
			local.player.trigger=0
		}	
	}

	self stoploopsound bombtick1
	local.mine remove
	local.player.trigger=0
end


thank you
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

I think he also use the mike.st file to activate this mod . Or one of the state files I think .
Image
Elgan
Site Admin
Posts: 890
Joined: Tue Apr 13, 2004 10:43 pm
Location: uk
Contact:

Post by Elgan »

correct. the i was told of this on tmt and @(...:.:...)@ said this


"Scope thing is proberbly because the mike legs file is different with spearhead and breakthrough. You need to use the spearhead/bt one when you make the mod. I have been trying it with breakthrough mic torso but there are a few problems.

I just added the 2 exec things I could find that you added in the origonal. Is that all you added to the mikelegs file?

Anyway, it sometimes doesnt seem to work when you are crouching, and You get a whole load of errors in the console. I attached it here (for breakthrough) It might work with spearhead, I don't know. (I just used the breakthrough legs file and added 2 exec to it in the places you did in the origonal. None of the script is edited)

(exesive zzzzz )"

the bt and sh anti_camper mod can also be found at www.mods-r-us.net

http://www.mods-r-us.net/page.php?id=22

you need to be logged in to download files.
Post Reply