• Luapad - In-game scripting environment with syntax highlighting
    156 replies, posted
[QUOTE=DarKSunrise;16225448]Do you get any errors when trying to save? What does it say on the statusbar?[/QUOTE] It acts as if everything was going fine, however it saves to ../data/bla, which gmod doesn't like. [editline]10:46PM[/editline] Oh, also could you enable reading/writing to gamemodes/ please?
[QUOTE=Lexic;16226128]It acts as if everything was going fine, however it saves to ../data/bla, which gmod doesn't like.[/QUOTE] Hm, I thought I fixed that. I'll upload a fixed version today. [QUOTE=Lexic;16226128]Oh, also could you enable reading/writing to gamemodes/ please?[/QUOTE] I'l do that too.
Thanks! This is going to be SO useful. I think the standard GMod should have this.
This is Godly very useful for making fixes in my server :D Although, does anyone have a tutorial for installing the gm_rawio? i got no clue where to upload the source and binary codes :(
This will surely help me. Thanks a lot.
With the auto complete, could you add a hint box too? Such as this: [img]http://img142.imageshack.us/img142/7163/hintexampletest5gp7.png[/img]
Can you load for example a swep file and modify it?
[QUOTE=JSharpe;16259489]With the auto complete, could you add a hint box too? Such as this: [img]http://img142.imageshack.us/img142/7163/hintexampletest5gp7.png[/img][/QUOTE] I require this plugin. Please direct me to it.
[QUOTE=Moo;16193277]huh blurred things WHAT ARE YOU HIDING[/QUOTE] Looks like modelbox and clientcrash.
I haven't gotten to upload the fixed version (if you don't have gm_rawio, you can't save) yet, as I'm currently debugging it. Except it shortly. [QUOTE=Kralax;16259354]This is Godly very useful for making fixes in my server :D Although, does anyone have a tutorial for installing the gm_rawio? i got no clue where to upload the source and binary codes :([/QUOTE] Just throw the gm_rawio.dll to garrysmod/garrysmod/lua/includes/modules/gm_rawio.dll You don't need the source at all. [QUOTE=JSharpe;16259489]With the auto complete, could you add a hint box too? Such as this: [img]http://img142.imageshack.us/img142/7163/hintexampletest5gp7.png[/img][/QUOTE] Probably not, but if I figure out how to do it, I will. [QUOTE=jakejakke;16259490]Can you load for example a swep file and modify it?[/QUOTE] Yes, if you have gm_rawio module installed. [editline]08:41PM[/editline] A new version has been released. This is just a quick patch/fix. [B]Changelog:[/B] Fixed saving being broken, if you don't have gm_rawio Fixed something else Changed some icons of the folders in file-list Added ability to modify files inside the gamemodes-folder [url=http://www.garrysmod.org/downloads/?a=view&id=74035][img]http://www.garrysmod.org/img/?t=dll&id=74035[/img][/url]
Excelent! The only problem left that I know about is if you copy-paste something from notepad++ into it, it loses all indentation.
[QUOTE=Lexic;16261973]I require this plugin. Please direct me to it.[/QUOTE] [url=http://www.facepunch.com/showthread.php?t=588255]Here.[/url]
[QUOTE=Lexic;16266680]Excelent! The only problem left that I know about is if you copy-paste something from notepad++ into it, it loses all indentation.[/QUOTE] Sadly you need to convert all tabs to spaces as this thing doesn't support tabs. Now also, if this isn't too much I would really like this. Oh wait, never mind. I'll do it myself some day. I was just thinking of something like sending memos to other players. You could evolve luapad to something like Garry's Mod Notepad++. Allow enabling and disabling lua highlighting for example.
Just mine or does Ctrl + N Crash HL2.exe? Hover over the buttons like "new/save" etc
One thing you should add is to close the tabs above the lua once your done with them :D And you should allow it to edit addons :D
OMG Hidden file says "clientcrash" D:
[QUOTE=Python1320;16269861]Sadly you need to convert all tabs to spaces as this thing doesn't support tabs. Now also, if this isn't too much I would really like this. Oh wait, never mind. I'll do it myself some day. I was just thinking of something like sending memos to other players. You could evolve luapad to something like Garry's Mod Notepad++. Allow enabling and disabling lua highlighting for example.[/QUOTE] That's what I've planned. [QUOTE=JSharpe;16277383]Just mine or does Ctrl + N Crash HL2.exe? Hover over the buttons like "new/save" etc[/QUOTE] Odd, since I don't have this problem. I'll quickly check if it's something with this new release. [QUOTE=Kralax;16277657]One thing you should add is to close the tabs above the lua once your done with them :D And you should allow it to edit addons :D[/QUOTE] It's already possible, if you have gm_rawio installed. (however you still need to restart GMod in-order to see the changes to addons)
[QUOTE=DarKSunrise;16279377]It's already possible, if you have gm_rawio installed. (however you still need to restart GMod in-order to see the changes to addons)[/QUOTE] No, you just have to reload the map.
[QUOTE=DarKSunrise;16279377]That's what I've planned.[/QUOTE] I don't think you can, the problem comes from the fact that HL2s textbox does not support tabs. That textbox is used to capture input and pasting the clipboard. The reason it is used is because Garrysmod does only support setting the clipboard, not getting it. Thus the only way to access the clipboard is through CTRL-V pasting in that textbox. If you find a solution I'd like to know, but I doubt there is one.
Adding a GetClipboardText function would probably be a bad idea, since it allows one to spy passwords and such. However, adding an OnPaste hook or something to VGUI text boxes would be something garry could do.
[lua]if not(datastream) then require("datastream"); end[/lua] That'll prevent it from breaking a few addons
datastream needs some fixing anyway :) it should accept recipientfilters for one...
[QUOTE=Deruu;16285292][lua]if not(datastream) then require("datastream"); end[/lua] That'll prevent it from breaking a few addons[/QUOTE] Hm? How does it break anything anyway?
if you re-require, modifications made by other addons are reverted. I'll do the same change to E2 to prevent that from happening there as well.
[QUOTE=TomyLobo;16286658]datastream needs some fixing anyway :) it should accept recipientfilters for one...[/QUOTE] [lua]local META = FindMetaTable("CRecipientFilter") if META then function META:IsValid() return true end else ErrorNoHalt(os.date().." Failed to fix datastream fuckup: \"CRecipientFilter\"'s metatable invalid.") end[/lua] This fixes datastream's fuckup without having to modify it or interfering with anything else that un-breaks it.
You know, I was actually dreaming about something like this for the past week, and now it just pops up. Thank you very much, as you've just made my life much easier. <3
[QUOTE=TomyLobo;16289821]if you re-require, modifications made by other addons are reverted. I'll do the same change to E2 to prevent that from happening there as well.[/QUOTE] Alright, I'll include that in the next version.
[QUOTE=Lexic;16290191][lua]local META = FindMetaTable("CRecipientFilter") if META then function META:IsValid() return true end else ErrorNoHalt(os.date().." Failed to fix datastream fuckup: \"CRecipientFilter\"'s metatable invalid.") end[/lua] This fixes datastream's fuckup without having to modify it or interfering with anything else that un-breaks it.[/QUOTE] I know. It'd still be nice to not have to do that. Also, someone might fix it in a different way, which is more vulnerable to re-requiring datastream.
Is this admin only? If I load this on my server, will everyone be able to use it? Edit: [QUOTE=DarKSunrise;16191922]but only if the server has Luapad, and you're an admin[/QUOTE] I must lrn2read.
[QUOTE=foszor;16195912]Wouldn't that be a big security risk? Or let me ask this question, do you have any ideas on how that could be implemented but not abused by other clientside scripts?[/QUOTE] Umm yea... it's called using lots of locals with no public concommands or anything thus disallowing any other script from using it. [lua] local function OmgImWritingToAnyFile( strFile, strText ) -- Secret code here... end [/lua] And how about making it even sweeter with some sugar on top so you can call a concommand without interference. [lua] local secretpw = '2glWWwQnAbcdbxBZUt1Ror7NjAYwKNfwIFT842IuUaOm5KSFO3jul60Qll9dnArD' concommand.Add( 'write_any_file', function( objPl, strComm, tblArgs ) local pw = tblArgs[1] if not pw == secretpw then return end local strFile = tblArgs[2] local strText = tblArgs[3] ... end ) [/lua] ` write_any_file( '2glWWwQnAbcdbxBZUt1Ror7NjAYwKNfwIFT842IuUaOm5KSFO3jul60Qll9dnArD', 'C:\hacks.exe', 'oh-shi' )
Sorry, you need to Log In to post a reply to this thread.