English Anti Entrance...

7 replies
Goto Page
To the start Previous 1 Next To the start
17.11.12 11:35:32 pm
Up
Jhony
User
Offline Off
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...
17.11.12 11:36:08 pm
Up
Jynxxx
User
Offline Off
Elaborate.
17.11.12 11:38:16 pm
Up
Yates
Reviewer
Offline Off
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.
18.11.12 04:27:17 pm
Up
Jhony
User
Offline Off
@user Yates: is possible with lua script?
18.11.12 04:43:13 pm
Up
Suprise
BANNED
Offline Off
I think you want a script like in the HC Admin Script.

Code:
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
18.11.12 04:46:07 pm
Up
mafia_man
User
Offline Off
user Suprise has written:
I think you want a script like in the HC Admin Script.

Code:
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.
18.11.12 05:15:07 pm
Up
Starkkz
Moderator
Offline Off
@user Suprise: Try using entity(xt, yt, "typename") instead of type. Also you should use string.lower because it contains upper case characters.
lol
18.11.12 06:20:54 pm
Up
Tobey
User
Offline Off
user mafia_man has written:
user Suprise has written:
I think you want a script like in the HC Admin Script.

Code:
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.
signature too huge
To the start Previous 1 Next To the start