Forum

> > CS2D > Scripts > Anti Entrance...
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Anti Entrance...

7 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Anti Entrance...

Jhony
User Off Offline

Zitieren
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...

alt Re: Anti Entrance...

Yates
Reviewer Off Offline

Zitieren
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.

alt Re: Anti Entrance...

Suprise
BANNED Off Offline

Zitieren
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
1× editiert, zuletzt 18.11.12 16:46:59

alt Re: Anti Entrance...

mafia_man
User Off Offline

Zitieren
user Suprise hat geschrieben
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.

alt Re: Anti Entrance...

Starkkz
Moderator Off Offline

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

alt Re: Anti Entrance...

Tobey
User Off Offline

Zitieren
user mafia_man hat geschrieben
user Suprise hat geschrieben
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.
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht