LUA: When players says a specific sentence then activate function!

Can anyone help me? i want (lets say) when you type “Test” in the chat the function (that i named “testfunc”) to be activated! please help me =)

Use the hook

[lua]
local function Test(ply, text)
–stuf here
end
hook.Add(“OnPlayerChat”, “Name” Test)
[/lua]

I tried using this but it gives me lua error :confused:

you forgot a comma after “Name”

If you couldn’t figure out what was wrong with that barebones sample you should step back from modding and read up on LUA documentation first.

Lol, sorry. Weed + Lua. And thank you :slight_smile: