Forum

> > CS2D > Scripts > why this script do not work?
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch why this script do not work?

3 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt why this script do not work?

wato24
User Off Offline

Zitieren
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

alt Re: why this script do not work?

schattex
User Off Offline

Zitieren
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.

alt Re: why this script do not work?

Tobey
User Off Offline

Zitieren
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.

alt Re: why this script do not work?

Apache uwu
User Off Offline

Zitieren
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
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht