Bug say for all
12 replies



28.02.14 09:25:29 pm
Hi guys again, there is a problem of my level script...
Please help. No admin (usgn)! CT,T and all can chats...
Code:
1
2
3
4
5
2
3
4
5
addhook("say","saylv")
function saylv(id,txt)
msg(""..player(id,"name").." [Lv "..lvm[id_t1].."]: ©255220000"..txt)
return 1
end
function saylv(id,txt)
msg(""..player(id,"name").." [Lv "..lvm[id_t1].."]: ©255220000"..txt)
return 1
end
Please help. No admin (usgn)! CT,T and all can chats...
Either combine all say-stuff in one single function which you add to the say-hook or use the priority-parameter of
addhook to prioritize the function which uses return.

Will try to help you using the easiest method...
@
Improved AddHook 2 (5)
Dont change anything on your code. Just dofile the script in the server.lua file.
@


Dont change anything on your code. Just dofile the script in the server.lua file.
If you do not use other sayhooks try it
Code:
1
2
3
4
5
2
3
4
5
addhook("say","saylv")
function saylv(id,txt)
msg(player(id,"name").." [Lv "..lvm[id_t1].."]: ©255220000"..txt)
return 1
end
function saylv(id,txt)
msg(player(id,"name").." [Lv "..lvm[id_t1].."]: ©255220000"..txt)
return 1
end
Code:
1
2
3
4
5
2
3
4
5
addhook("say","saylv",420)
function saylv(id,txt)
msg(player(id,"name").." [Lv "..lvm[id_t1].."]: ©255220000"..txt)
return 1
end
function saylv(id,txt)
msg(player(id,"name").." [Lv "..lvm[id_t1].."]: ©255220000"..txt)
return 1
end
Try this.
Code:
1
2
3
4
5
2
3
4
5
addhook("say","saylv",420)
function saylv(id,txt)
msg(player(id,"name") .. " [Lv " .. lvm[id_t1] .. "]: ©255220000" .. txt)
return 1
end
function saylv(id,txt)
msg(player(id,"name") .. " [Lv " .. lvm[id_t1] .. "]: ©255220000" .. txt)
return 1
end
CS2DArchive - Version Database www.CS2DArchive.com - WebHosting: www.BroHosting.eu
No matter which code you're using, it always same, buggy.
Actually, your problem is
Alistaire has written:
To fix it
Actually, your problem is

You have multiple sayhooks.
To fix it





