Gamemode Modules - Modules not working

-snip- fixed.
My addcsluafile method failed

ply:EmitSound( v, 100, 100 )

maybe?

No, I know for a fact my code works. It works in lua/autorun
except I want it to be in my modules folder so it is efficient. Etc I don’t have external files. And all my files are in my gamemode folder.

Because EmitSound only works on the client if triggered from the client instance (nobody else can hear it)

Oh and PlayerSay is serverside.

Exactly. This code is serverside. If you guys are confused. None of my modules work.
All of them work in autorun though.

EDIT:

I just found out that doing

[lua]
for k, v in pairs( file.FindInLua( “DarkRP/gamemode/modules/*.lua” ) ) do

AddCSLuaFile("modules/"..v)  
include("modules/"..v)

end
[/lua]

doesn’t work either. So it can’t have to do with including the files…

Because the file should be in autorun unless you just program it straight into the gamemode itself. I don’t know why you keep calling it a module if it’s a lua file it’s called a script unless its .dll thats the only thing confusing me. If it works in autorun then why not leave it in autorun?

Read the first post, I said I fixed it :expressionless: Thanks for helping anyways.

K, just don’t go sending serverside code to the client anymore.