Forum

> > CS2D > Scripts > Select button Function
Forums overviewCS2D overview Scripts overviewLog in to reply

English Select button Function

8 replies
To the start Previous 1 Next To the start

old Select button Function

Leonidas12
User Off Offline

Quote
i need help.im teleport five seven lua end he escapes the (join T)function i needdddd help...

1
i enyting about this

old Re: Select button Function

Surplus
User Off Offline

Quote
He means that he used some five seven script to set somebody as T, then he switched team again. Maybe he wants a team lock.

old Re: Select button Function

Leonidas12
User Off Offline

Quote
my five seven lua:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
-- hooks
addhook("startround","telemsg")
addhook("hit","telego")

-- variables
tilex = 130
tiley = 60

-- functions
function telemsg()
     msg("©255000000Lua Made By Neomage")
end

function telego(id,src,wpn)
     if wpn == 6 then
          -- I assume the position given are in tiles, so...
          local rx = (tilex*32)+16
          local ry = (tiley*32)+16
          parse("setpos "..id.." "..rx.." "..ry)
     end
end

t retry joins t end escapes my jail

PLEASE HELP ME!!!

old Re: Select button Function

Apache uwu
User Off Offline

Quote
That should work fine, if the player rejoins the game they won't be jailed. Unless you do this.

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
jailed={}

addhook("spawn","_spawn")
addhook("startround","telemsg")
addhook("hit","telego")

tilex=130
tiley=60

function _spawn(id)
	if jailed[player(id,"ip")]~=nil then
		parse("setpos "..id.." "..tilex.." "..tiley")
		msg2(id,string.char(169).."25500000You have been jailed!")
	end
end

function telemsg()
	msg("©255000000Lua Made By Neomage")
end

function telego(id,src,wpn)
	if wpn == 6 then
		local rx = (tilex*32)+16
		local ry = (tiley*32)+16
		parse("setpos "..id.." "..rx.." "..ry)
		jailed[player(id,"ip")]=true
	end
end
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview