Team Spartan Cookies & Milk Forums
return in chat.listen() - Printable Version

+- Team Spartan Cookies & Milk Forums (https://teamscm.co.uk)
+-- Forum: Garry's Mod (https://teamscm.co.uk/forum-4.html)
+--- Forum: Starfall (https://teamscm.co.uk/forum-7.html)
+--- Thread: return in chat.listen() (/thread-2427.html)



return in chat.listen() - 4N0NYM - 19-08-2017

Does return dont work anymore or i m using it wrong ?


if SERVER then
function chatCommands( Message, Player )
LS = Message:lower()
LSC = LS:explode( " " )
if LSC[1] == "hey" then
if Player == ents.owner() then
say("Hello World")
end
return
end
end
chat.listen(chatCommands)
end

oh and i forget to add that :enableCollisions() dont work on a Wire Button.


RE: return in chat.listen() - Skeleton - 19-08-2017

You just needed to check the documentation of Starfall to find your answer.
But since I am kind here it is:

[Image: b959b16988eaefb819b06e034915f594.png]


RE: return in chat.listen() - 4N0NYM - 19-08-2017

Ty Skelly, but still have 1 more question, would be nice if Person or other Mods+ could answer it Smile


RE: return in chat.listen() - Kosmos - 19-08-2017

You know, something can have collisions enabled yet not collide with players or props. You have to set the collision group (that's also how the context menu option does it by the way). Note that in this cases, collision group none means collide with everything.