Am i using lua correctly?

I have used Lua in a different game, but Lua differs in alot of different games, so i need someone to check if this code is working right.



function PlayerPlltxe(Player, Text)
 if aconcmd = poop then
  print("Text")
 else return false
end
hook.Add("PlayerSay", "PlayerPlltxe", PlayerPlltxe)
concommand.Add("Set_aconcmd",aconcmd)


Your concommand.Add line is messed up, call the function instead.

Why are you using a hook and a console command?

What exactly are you trying to do with that code? It looks completely buggered up.

[lua]
hook.Add(“PlayerSay”, “PlayerPLLTXE”, function(p,t)
if( t == “poop” ) then
print(“HE SAID POOP! OMG HE TOTALLY SAID POOP! :)”);
end
end)
[/lua]
Shouldn’t return false in the player say hook or no text will get through to the chat except “poop”.