put them on the floor or wall and bind to either zm and plz people who I can create it
a script that can be added to a 1.15 ZombiePlague by Blazzingxx
Scripts
Request Lasermine script that CS1.6
Request Lasermine script that CS1.6
1

lasermines={}
images={}
for a =1,32 do
	images[a]={}
end
addhook('startround','startround')
function startround()
	lasermines={}
end
addhook('movetile','movetile')
function movetile(id,tilex,tiley)	
	if player(id,"team")==1 then
		for n,w in pairs (lasermines) do
			if w[1]==tilex and w[2]==tiley then
				parse('customkill '..w[3]..' \"laser mine \" '..id)
			end
		end
	end
end
function resetplayermines(id)	
	for n,w in pairs (lasermines) do
		if w[3]==id then
			table.remove(lasermines,n)
		end
	end
	for n,w in pairs (images[id]) do
		freeimage(w)
		images[id]={}
	end
end
addhook('leave','resetplayermines')
addhook('team','resetplayermines')
function rotbyside(rot)
	if rot >= -45 and rot <= 45 then
		return 1
	elseif rot > 45 and rot < 135 then
		return 2
	elseif rot > 135 or rot < -135 then
		return 3
	elseif rot < -45 and rot > -135 then
		return 4
	else
		return 5
	end
end
addhook('say','say')
function say(id,t)
	local text = string.lower(t)
	if t == "!lasermine" and player(id,"team")==2 then
		local rot = rotbyside(player(id,"rot"))
		local tilex,tiley=player(id,"tilex"),player(id,"tiley")
		tilex,tiley=moveposition(tilex,tiley,rot,1)
		if tile(tilex,tiley,"wall") then
			plantmine(id,tilex,tiley,rot)
			msg2(id,"©000255000You've planted lasermine!")
		else
			msg2(id,"©255000000You can't plant lasermine here!")
		end
		return 1
	end
end
function moveposition(tilex,tiley,rot,distance)
	if not distance then distance = 1 end
	local x,y = 0,0
	if rot == 1 then
		y=-1		
	elseif rot == 2 then
		x=1
	elseif rot == 3 then
		y=1
	else
		x=-1
	end
	return tilex+(x*distance),tiley+(y*distance)
end
function plantmine(id,tilex,tiley,rot)
	local pos={tilex,tiley}
	if tile(tilex,tiley,"wall") then
		for a=1,6 do
			tilex,tiley=moveposition(tilex,tiley,rot,-1)
			if tile(tilex,tiley,"walkable") then
				table.insert(lasermines,{tilex,tiley,id})
				local img
				if a==1 then
					local position={x=0,y=0}
					if rot == 1 then
						position.x=16
						position.y=2
					elseif rot == 2 then
						position.x=30
						position.y=16
					elseif rot == 3 then
						position.y=30
						position.x=16
					else
						position.y=16
						position.x=2
					end
					img = image('gfx/weapons/lasermine.bmp<m>',tilex*32+16,tiley*32+16,1)
					imagepos(img,tilex*32+position.x,tiley*32+position.y,rot*90-90)
					table.insert(images[id],img)
				end
			end
		end
		img = image('gfx/hud_shade.bmp<a>',tilex*32+16,tiley*32+16,1)
		imagescale(img,0.9,3)
		imagecolor(img,0,0,255)
		if rot == 1 then
			pos[2]=pos[2]*32+150
			pos[1]=pos[1]*32+16
			rot = 90
		elseif rot == 2 then
			pos[1]=pos[1]*32-118
			pos[2]=pos[2]*32+16
			rot = 180
		elseif rot == 3 then
			pos[1]=pos[1]*32+17
			pos[2]=pos[2]*32-120
			rot = 270
		else
			pos[1]=pos[1]*32+150
			pos[2]=pos[2]*32+17
			rot = 0
		end
		imagepos(img,pos[1],pos[2],rot)
		table.insert(images[id],img)
	end
end
Re: Request Lasermine script that CS1.6
Happy eyes has writtenlasermines={}
images={}
for a =1,32 do
	images[a]={}
end
addhook('startround','startround')
function startround()
	lasermines={}
end
addhook('movetile','movetile')
function movetile(id,tilex,tiley)	
	if player(id,"team")==1 then
		for n,w in pairs (lasermines) do
			if w[1]==tilex and w[2]==tiley then
				parse('customkill '..w[3]..' \"laser mine \" '..id)
			end
		end
	end
end
function resetplayermines(id)	
	for n,w in pairs (lasermines) do
		if w[3]==id then
			table.remove(lasermines,n)
		end
	end
	for n,w in pairs (images[id]) do
		freeimage(w)
		images[id]={}
	end
end
addhook('leave','resetplayermines')
addhook('team','resetplayermines')
function rotbyside(rot)
	if rot >= -45 and rot <= 45 then
		return 1
	elseif rot > 45 and rot < 135 then
		return 2
	elseif rot > 135 or rot < -135 then
		return 3
	elseif rot < -45 and rot > -135 then
		return 4
	else
		return 5
	end
end
addhook('say','say')
function say(id,t)
	local text = string.lower(t)
	if t == "!lasermine" and player(id,"team")==2 then
		local rot = rotbyside(player(id,"rot"))
		local tilex,tiley=player(id,"tilex"),player(id,"tiley")
		tilex,tiley=moveposition(tilex,tiley,rot,1)
		if tile(tilex,tiley,"wall") then
			plantmine(id,tilex,tiley,rot)
			msg2(id,"©000255000You've planted lasermine!")
		else
			msg2(id,"©255000000You can't plant lasermine here!")
		end
		return 1
	end
end
function moveposition(tilex,tiley,rot,distance)
	if not distance then distance = 1 end
	local x,y = 0,0
	if rot == 1 then
		y=-1		
	elseif rot == 2 then
		x=1
	elseif rot == 3 then
		y=1
	else
		x=-1
	end
	return tilex+(x*distance),tiley+(y*distance)
end
function plantmine(id,tilex,tiley,rot)
	local pos={tilex,tiley}
	if tile(tilex,tiley,"wall") then
		for a=1,6 do
			tilex,tiley=moveposition(tilex,tiley,rot,-1)
			if tile(tilex,tiley,"walkable") then
				table.insert(lasermines,{tilex,tiley,id})
				local img
				if a==1 then
					local position={x=0,y=0}
					if rot == 1 then
						position.x=16
						position.y=2
					elseif rot == 2 then
						position.x=30
						position.y=16
					elseif rot == 3 then
						position.y=30
						position.x=16
					else
						position.y=16
						position.x=2
					end
					img = image('gfx/weapons/lasermine.bmp<m>',tilex*32+16,tiley*32+16,1)
					imagepos(img,tilex*32+position.x,tiley*32+position.y,rot*90-90)
					table.insert(images[id],img)
				end
			end
		end
		img = image('gfx/hud_shade.bmp<a>',tilex*32+16,tiley*32+16,1)
		imagescale(img,0.9,3)
		imagecolor(img,0,0,255)
		if rot == 1 then
			pos[2]=pos[2]*32+150
			pos[1]=pos[1]*32+16
			rot = 90
		elseif rot == 2 then
			pos[1]=pos[1]*32-118
			pos[2]=pos[2]*32+16
			rot = 180
		elseif rot == 3 then
			pos[1]=pos[1]*32+17
			pos[2]=pos[2]*32-120
			rot = 270
		else
			pos[1]=pos[1]*32+150
			pos[2]=pos[2]*32+17
			rot = 0
		end
		imagepos(img,pos[1],pos[2],rot)
		table.insert(images[id],img)
	end
end
Infinite Rain: Oh lol, never knew this
Thanks
Deevix has written
1
