Forum

> > CS2D > Scripts > Door/Wall Kill
Forums overviewCS2D overview Scripts overviewLog in to reply

English Door/Wall Kill

5 replies
To the start Previous 1 Next To the start

old Door/Wall Kill

sheeL
User Off Offline

Quote
Hello, I came to know about a script for WALL KILL
It is not wall to kill on my server, can you help me?
Without being Textual Context of the script ... There's another console or a command can do to help me?
sorry for my English everyone

^^'

old Re: Door/Wall Kill

3RROR
User Off Offline

Quote
I don't what you mean but you can create a customkill of that
- customkill ID1 Wall ID2

old Re: Door/Wall Kill

sheeL
User Off Offline

Quote
user SilentDash has written
If you didn't want that doorkilling is possible on your Server edit the doors in the map.

his post with better english >


I need a script "Anti Kill Door"
to give the server a friend
I am the moderator and not to make a map editor for

old Re: Door/Wall Kill

Apache uwu
User Off Offline

Quote
Well you could check if any players are at the tile position of the door--and prevent the door from triggering.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
addhook("trigger","_trigger")

admins={45813}
doors={}

for x=0,map("xsize") do
	for y=0,map("ysize") do
		if entity(x,y,"exists") and entity(x,y,"type")==71 then
			if entity(x,y,"name")~="" then
				doors[entity(x,y,"name")]={x,y}
			end
		end
	end
end

function _trigger(trigger)
	if doors[trigger]~=nil then
		for _,living in ipairs(player(0,"tableliving")) do
			if player(living,"tilex")==doors[trigger][1] and player(living,"tiley")==doors[trigger][2] then
				for _,usgn in ipairs(admins) do
					if player(living,"usgn")==usgn then
						return 1
					end
				end
			end
		end
	end
end


Edit: (spell check)
Try this. It's tested :). Players cannot close doors if an "admin" is in the way of the door.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview