• Murder stop "OnPlayerChat"
    3 replies, posted
Hi, I actually work on a addon based with the murder gamemode, so i use the hook "OnPlayerChat" to open a derma panel. hook.Add("OnPlayerChat", "nlf-suggestion_OnPlayerChat", function(ply, txt) print("one is writing") if ply != LocalPlayer() then return end print("is player") if string.lower( txt ) == "!suggestion" then Os_Sg:OpenDerma() print("open derma") return true end end) this script work correctly but he did not work when the player is in a round and alive, the first print was not printing Someone can explain me why ? Thank you
Could this be that the hook is not being run because another addon or the gamemode has overriden the OnPlayerChat function? Have you tried this in sandbox with no addons?
Yeah, a french developer have helped me and he was find this: murder/sv_player.lua at 06acc581936a1ba11acd5c8127b49ac0c848362c..
Unfortunately the PlayerSay hook is server-side; since you're using it to open a dermal panel, which is client-side, you can only use OnPlayerChat.
Sorry, you need to Log In to post a reply to this thread.