Return No Works...
6 replies



19.07.13 03:18:27 am
the problem is that the return not work
code:
code:
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
staffs = {74551}
addhook("say","staff_say")
function staff_say(id,t)
for _, usgn in ipairs(staffs) do
if player(id,'usgn') == usgn then
msg("©000128128[STAFF] "..player(id,"name").." :©255255255 "..t)
return 1
end
end
end
addhook("say" , "help_txt")
function help_txt(id,tx)
if tx=="!help" then
msg2(id,"xxxxxxxxxxxxxxxxxx")
return 1
end
end
addhook("say","staff_say")
function staff_say(id,t)
for _, usgn in ipairs(staffs) do
if player(id,'usgn') == usgn then
msg("©000128128[STAFF] "..player(id,"name").." :©255255255 "..t)
return 1
end
end
end
addhook("say" , "help_txt")
function help_txt(id,tx)
if tx=="!help" then
msg2(id,"xxxxxxxxxxxxxxxxxx")
return 1
end
end
You have to put it in the same function do not use multiple functions of the same kind!
Tested, works.
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2
3
4
5
6
7
8
9
10
11
12
13
14
15
staffs = {74551}
addhook("say","staff_say")
function staff_say(id,text)
for _, usgn in ipairs(staffs) do
if player(id,'usgn') == usgn then
msg("©000128128[STAFF] "..player(id,"name").." :©255255255 "..text)
return 1
end
if text=="!help" then
msg2(id,"xxxxxxxxxxxxxxxxxx")
return 1
end
end
end
addhook("say","staff_say")
function staff_say(id,text)
for _, usgn in ipairs(staffs) do
if player(id,'usgn') == usgn then
msg("©000128128[STAFF] "..player(id,"name").." :©255255255 "..text)
return 1
end
if text=="!help" then
msg2(id,"xxxxxxxxxxxxxxxxxx")
return 1
end
end
end
Tested, works.
edited 1×, last 19.07.13 08:37:46 am

You have to put it in the same function do not use multiple functions of the same kind!
Tested, works.
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2
3
4
5
6
7
8
9
10
11
12
13
14
15
staffs = {74551}
addhook("say","staff_say")
function staff_say(id,text)
for _, usgn in ipairs(staffs) do
if player(id,'usgn') == usgn then
msg("©000128128[STAFF] "..player(id,"name").." :©255255255 "..text)
return 1
end
if text=="!help" then
msg2(id,"xxxxxxxxxxxxxxxxxx")
return 1
end
end
end
addhook("say","staff_say")
function staff_say(id,text)
for _, usgn in ipairs(staffs) do
if player(id,'usgn') == usgn then
msg("©000128128[STAFF] "..player(id,"name").." :©255255255 "..text)
return 1
end
if text=="!help" then
msg2(id,"xxxxxxxxxxxxxxxxxx")
return 1
end
end
end
Tested, works.

Tested it. Works fine.
It might be because you're running few other scripts that use "say" hook.
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
staffs = {15476}
addhook("say","staff_say")
function staff_say(id,text)
if text=="!help" then
msg2(id,"xxxxxxxxxxxxxxxxxx")
return 1
else
for _, usgn in ipairs(staffs) do
if player(id,'usgn') == usgn then
msg("\169000128128[STAFF] "..player(id,"name").." :\169255255255 "..text)
return 1
end
end
end
end
addhook("say","staff_say")
function staff_say(id,text)
if text=="!help" then
msg2(id,"xxxxxxxxxxxxxxxxxx")
return 1
else
for _, usgn in ipairs(staffs) do
if player(id,'usgn') == usgn then
msg("\169000128128[STAFF] "..player(id,"name").." :\169255255255 "..text)
return 1
end
end
end
end
It might be because you're running few other scripts that use "say" hook.

Tested it. Works fine.
It might be because you're running few other scripts that use "say" hook.
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
staffs = {15476}
addhook("say","staff_say")
function staff_say(id,text)
if text=="!help" then
msg2(id,"xxxxxxxxxxxxxxxxxx")
return 1
else
for _, usgn in ipairs(staffs) do
if player(id,'usgn') == usgn then
msg("\169000128128[STAFF] "..player(id,"name").." :\169255255255 "..text)
return 1
end
end
end
end
addhook("say","staff_say")
function staff_say(id,text)
if text=="!help" then
msg2(id,"xxxxxxxxxxxxxxxxxx")
return 1
else
for _, usgn in ipairs(staffs) do
if player(id,'usgn') == usgn then
msg("\169000128128[STAFF] "..player(id,"name").." :\169255255255 "..text)
return 1
end
end
end
end
It might be because you're running few other scripts that use "say" hook.
tanks



