Forum

> > CS2D > Scripts > function say not work
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch function say not work

6 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt function say not work

Gaios
Reviewer Off Offline

Zitieren
Why when I add line if level[id] == 1 then, function not work?

1
function say(id,txt)
1
2
3
4
5
6
7
8
9
10
11
if mute[id] == true then
	return 1
end
if mute[id] == false then
	if text[id] == true then
		if level[id] == 1 then
			m(id,cmds.colors.member,player(id,"name").." [Member]: "..txt,1)
			return 1
		end
	end
end

Others >
3× editiert, zuletzt 05.10.12 06:18:48

alt Re: function say not work

omg
User Off Offline

Zitieren
user - - - - - - - - - - - - - hat geschrieben
Error Line 7:

1
m(id,cmds.colors.member,player(id,"name").." [Member]: "..txt,1)

is

1
msg(id,cmds.colors.member,player(id,"name").." [Member]: "..txt,1)

i think that is that

can u not be dumb? its a function that he wrote himself, obviously + its still wrong

also, we need more of ur code. specifically, stuff involved with level and the function its in

alt Re: function say not work

Gaios
Reviewer Off Offline

Zitieren
1
2
3
4
5
6
7
function m(id,color,txt,mode)
	if mode == 1 then
		msg("©"..color..""..txt)
	elseif mode == 2 then
		msg2(id,"©"..color..""..txt)
	end
end
1
2
3
4
5
cmds = {
	colors = {
		member = "255255000",
	},
}

alt Re: function say not work

Yates
Reviewer Off Offline

Zitieren
Use tables;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
MyTable = {}

addhook("join","_join")
function _join(id)
 MyTable[id] = {}
 MyTable[id].text = 1
 MyTable[id].level = 1
end

addhook("say","_say")
function _say(id,text)
 if MyTable[id].text == 1 then
  if MyTable[id].level == 1 then
   -- Text shit
  end
 end
end
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht