Forum

> > CS2D > Scripts > why this script do not work?
Forums overviewCS2D overview Scripts overviewLog in to reply

English why this script do not work?

3 replies
To the start Previous 1 Next To the start

old why this script do not work?

wato24
User Off Offline

Quote
addhook("menu","teleport")
function teleport(id,title,button)
if title == "Music" then
if button == 3 then
     parse ("setpos "..id.." 2290 108")
end
end
end
end


--- this not work, please fix it

old Re: why this script do not work?

schattex
User Off Offline

Quote
1
2
3
4
5
6
7
8
addhook("menu","teleport")
function teleport(id,title,button)
 if title == "Music" then
  if button == 3 then
   parse ("setpos "..id.." 2290 108")
  end
 end
end

That's how.

old Re: why this script do not work?

Tobey
User Off Offline

Quote
problems:
- you didn't use the code tag
- you have one "end" too much
- you didn't declare a menu called "Music" (it is completely missing)

watch up example scripts. if someone does that simple script for you, you won't learn from it.

old Re: why this script do not work?

Apache uwu
User Off Offline

Quote
He could learn from looking at the scripts you post.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
addhook("menu","teleport")

function teleport(id,title,button)
	if title~="Music" then
		return 0
	end
	if button==3 then
		parse("setpos "..id.." 2290 108")
	end
end

addhook("serveraction","_serveraction")

function _serveraction(id,action)
	menu(id,"Music,,,Teleport")
end
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview