1. ich hab ein teleport script
2. Ich will das man mit den Tele-script nicht in Wände teleportiren Kann.
(3. Das TeleportScript geht.)
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
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
function array(m,v)
local a = {}
for i = 1, m do
a[i] = v
end
return a
end
mouse_event = array(32,0)
addhook("always","TeleportAlways")
function TeleportAlways()
for _, id in pairs(player(0,"table")) do
if mouse_event[id] > 0 then
reqcld(id,2) -- Request Client Data
end
end
end
addhook('clientdata','teleportrequest')
function teleportrequest(id,m,x,y)
if m == 2 then
if mouse_event[id] == 1 then
-- Teleport Event
if x > 0 and y > 0 and x < map([[xsize]]) * 32 and y < map([[ysize]]) * 32 then
parse("setpos "..id.." "..x.." "..y)
end
mouse_event[id] = 0
end
end
end
addhook("serveraction","admintele")
function admintele(id,ac)
if isT(id) then
if ac == 0 then
if player(id,"exists") then
local angle = math.rad(player(id,"rot"))
local x = player(id,[[x]]) + math.sin(angle) * 15
local y = player(id,[[y]]) - math.cos(angle) * 15
if x > 0 and y > 0 and x < map([[xsize]]) * 32 and y < map([[ysize]]) * 32 then
parse([[setpos ]]..id..[[ ]]..x..[[ ]]..y)
end
end
elseif ac==3 then
mouse_event[id] = 1
end
end
end
edited 3×, last 14.07.13 03:23:34 pm