On/Off gate as Script.
10 replies



25.07.18 03:59:07 pm
Hello everyone,
i need some help.
I'm using a script for teleport a player in a new place if he kill 10 or more players.
Script below:
I made a room in my map where a new place if anybody kill 10 or more players, i want this room gate only operate/use by them who killed 10 or more players if 1 or more players got this room so he can use.
i set Gate names to "mygate"
Please help anybody can make this script for me.
i need some help.
I'm using a script for teleport a player in a new place if he kill 10 or more players.
Script below:
I made a room in my map where a new place if anybody kill 10 or more players, i want this room gate only operate/use by them who killed 10 or more players if 1 or more players got this room so he can use.
i set Gate names to "mygate"
Please help anybody can make this script for me.
FRiendly boYy.
...You didn't even remove my debugger? It sends hud every 100ms you know 
Learn how it works before trying to do difficult stuff

Learn how it works before trying to do difficult stuff
Best match: https://www.youtube.com/watch?v=je2Q2XR2Zys
@
Quattro: I will change it
i know how to change your Fking hudtxt
Can help me as i want in my topic ?


Can help me as i want in my topic ?
FRiendly boYy.
Well you won't get any FKing help from me anymore
Best match: https://www.youtube.com/watch?v=je2Q2XR2Zys
try this one :
PS : I didn't test it.
Code:
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
--------------------------
---Teleportation jutsu----
--------------------------
tilex = 23
tiley = 1
--------------------------
----Score requirements----
--------------------------
score_max = 10
---------------
-----Setup-----
---------------
kills = 0
use_gate = {}
for i = 1, 32 do ace[i] = 0 end
addhook("spawn","_spawn")
addhook("ms100","debugger")
addhook("join","_join")
addhook("kill","_kill")
---------------
---Functions---
---------------
function debugger()
parse('hudtxt 0 "©255255255P1Ace?: ['..ace[1]..'] P1Kills: ['..player(1,'score')..'] P1Deaths: ['..player(1,'deaths')..']" 100 100 0 0 20')
end
function _spawn(id)
if use_gate[id] == true then
local x = tilex * 32 + 16
local y = tiley * 32 + 16
parse('setpos '..id..' '..x..' '..y)
msg2(id,'©255255255New Place')
end
end
function kill(k,v)
kills[k] = kills[k] + 1
if kills[k] > score_max then
if player(k,"deaths") <= 0 then
if use_gate == false then
use_gate[k] = true
kills[k] = 0
end
end
end
end
function _join(id)
use_gate[id] = false
kills[id] = 0
end
---Teleportation jutsu----
--------------------------
tilex = 23
tiley = 1
--------------------------
----Score requirements----
--------------------------
score_max = 10
---------------
-----Setup-----
---------------
kills = 0
use_gate = {}
for i = 1, 32 do ace[i] = 0 end
addhook("spawn","_spawn")
addhook("ms100","debugger")
addhook("join","_join")
addhook("kill","_kill")
---------------
---Functions---
---------------
function debugger()
parse('hudtxt 0 "©255255255P1Ace?: ['..ace[1]..'] P1Kills: ['..player(1,'score')..'] P1Deaths: ['..player(1,'deaths')..']" 100 100 0 0 20')
end
function _spawn(id)
if use_gate[id] == true then
local x = tilex * 32 + 16
local y = tiley * 32 + 16
parse('setpos '..id..' '..x..' '..y)
msg2(id,'©255255255New Place')
end
end
function kill(k,v)
kills[k] = kills[k] + 1
if kills[k] > score_max then
if player(k,"deaths") <= 0 then
if use_gate == false then
use_gate[k] = true
kills[k] = 0
end
end
end
end
function _join(id)
use_gate[id] = false
kills[id] = 0
end
PS : I didn't test it.
l
give me x and y of your gate you can find it in map editor of your map in the down of the screen x|y thats tile position give me it :v



