lewisclark / glua-steal

Retrieves client-sided Lua files from Garry's Mod game servers
GNU General Public License v3.0
151 stars 15 forks source link

Can you help about executing Lua commands? #13

Closed orhaniscoding closed 4 years ago

orhaniscoding commented 4 years ago

I've bit confused about running lua code. What phase is it loading lua codes? I mean if I write that:

if (gluasteal.SCRIPT:match("roll")) then some lua code here return end

in to gluasteal.lua file, would it run lua code when any roll.lua executed at game? Otherwise can I change serverside things by some sync functions that I found in server lua files?

lewisclark commented 4 years ago

Yes, that code there would be loaded if any clientside or shared script had 'roll' in its name. glua-steal cannot look at serverside files because they are never sent to the client.