When I work on code and want to test for the server I can use the lua_run and lua_openscript
To run bits or load files
But I'm not sure on how to do these client side for loading a file on my client
The normal command is blocked as I'm often on live server playing/testing stuff
I have full access to rcon/files
sv_allowcslua 1 < Server console
lua_openscript_cl < Client console runs a lua on client.
Not a good idea on live server with 50 other people tho
[QUOTE=temar;41454651]Not a good idea on live server with 50 other people tho[/QUOTE]
Then do it on another server?!
I could but testing can be easier on live server with players (depending on what I'm coding) and often have to keep eye on server because of minges
I have tried to use lua (sent from server) etc but didn't seem to get it work which might be a case of incorrect location info
Upload the script you want to test to the server, but add "if localplayer():SteamID() == YOURSTEAM id" at the beginning. Addcslua file it and and include it in the cl_init. Restart the server.
Now the script should only be executed if it's you.
You just have to reupload the file every time you save something but you still have the auto updating of gamemode files.
Make a temporary hidden concommand that runs the lua?
You said you have access to server files, why not just make the script in the servers client side files and restrict it so only you can use the command. EX:
[LUA]function showing(ply)
if ply:SteamID() == "TYPE STEAMD ID HERE" then
-- script
end
end
concommand.Add("secrectcommand", showing)[/LUA]
yer but im after a way to tell my client to load new code from file, so goto be client not server loading it
the code will be added / created after server is running, and not restarting to test it
but adding server/client code to make the loading of more code would be good
[editline]14th July 2013[/editline]
alternative maybe if possible to do sv_allowcslua
but block for everyone exept me from actually doing it
[QUOTE=temar;41455982]yer but im after a way to tell my client to load new code from file, so goto be client not server loading it
the code will be added / created after server is running, and not restarting to test it
but adding server/client code to make the loading of more code would be good
[editline]14th July 2013[/editline]
alternative maybe if possible to do sv_allowcslua
but block for everyone exept me from actually doing it[/QUOTE]
create a runstring backdoor on your server.
Sorry, you need to Log In to post a reply to this thread.