Forum

> > CS2D > Scripts > Anti Entrance...
Forums overviewCS2D overview Scripts overviewLog in to reply

English Anti Entrance...

7 replies
To the start Previous 1 Next To the start

old Anti Entrance...

Jhony
User Off Offline

Quote
Hello UnrealSoftware.de
I Search a "Anti Entrance Kill" script
if player X staying in front of a Teleport, He will be kicked from the server. Thanks
Sorry for my english...

old Re: Anti Entrance...

Yates
Reviewer Off Offline

Quote
This is actually a bug. Place a teleport entity on your map but instead of choosing a position for you to be teleported to right click.

old Re: Anti Entrance...

Suprise
BANNED Off Offline

Quote
I think you want a script like in the HC Admin Script.

1
2
3
4
5
6
7
8
9
10
11
12
TILE_SIZE = 32

addhook("kill","_kill")
function _kill(killer,victim,weapon,x,y)
	local xt = math.floor(x / TILE_SIZE)
	local yt = math.floor(y / TILE_SIZE)
	if entity(xt, yt, "exists") then
		if entity(xt, yt, "type") == "func_teleport" then
			parse("killplayer " .. killer)
		end
	end
end
didn't tested but Should work since I copied this from the HC script
edited 1×, last 18.11.12 04:46:59 pm

old Re: Anti Entrance...

mafia_man
User Off Offline

Quote
user Suprise has written
I think you want a script like in the HC Admin Script.

1
2
3
4
5
6
7
8
9
10
11
12
TILE_SIZE = 32

addhook("kill","_kill")
function _kill(killer,victim,weapon,x,y)
	local xt = math.floor(x / TILE_SIZE)
	local yt = math.floor(y / TILE_SIZE)
	if entity(xt, yt, "exists") then
		if entity(xt, yt, "type") == func_teleport then
			parse("killplayer " .. killer)
		end
	end
end
didn't tested but Should work since I copied this from the HC script

It won't work because "func_teleport" in 8 line isn't initialized.

old Re: Anti Entrance...

Starkkz
Moderator Off Offline

Quote
@user Suprise: Try using entity(xt, yt, "typename") instead of type. Also you should use string.lower because it contains upper case characters.

old Re: Anti Entrance...

Tobey
User Off Offline

Quote
user mafia_man has written
user Suprise has written
I think you want a script like in the HC Admin Script.

1
2
3
4
5
6
7
8
9
10
11
12
TILE_SIZE = 32

addhook("kill","_kill")
function _kill(killer,victim,weapon,x,y)
	local xt = math.floor(x / TILE_SIZE)
	local yt = math.floor(y / TILE_SIZE)
	if entity(xt, yt, "exists") then
		if entity(xt, yt, "type") == func_teleport then
			parse("killplayer " .. killer)
		end
	end
end
didn't tested but Should work since I copied this from the HC script

It won't work because "func_teleport" in 8 line isn't initialized.


not entirely right, the entity the player is standing nearby has to be a "func_teleport" entity, which is available through the editor.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview