+ Reply to Thread
Results 1 to 8 of 8

Thread: Save only Adv Dupe?

  1. #1
    Inactive Dabien is on a distinguished road Dabien's Avatar
    Join Date
    Feb 2008
    Location
    Manchester, UK
    Posts
    7

    Default Save only Adv Dupe?

    Hey there, just wondering if its possible to make Adv Dupe save only on a server?

    I've looked through the server file, and found:
    'local MaxUploadSize = 0 --per player. -1 disable, 0 no limit, >0 K characers allowed (K = 1024). allows up to (MaxUploadLength - 1) charcters over this limit.,'

    Which I guess would stop people uploading if set to -1, but I suppose they could still load things they've just saved.

    This is for a Stranded server, so we'd like to allow players the ability to save things they're proud of, to store in single player. Is there an easy way of changing this, or would this involve lua mangling?

    Thanks for any help guys, its appreciated.

  2. #2
    hat full of head

    Azrael is a glorious beacon of light Azrael is a glorious beacon of light Azrael is a glorious beacon of light Azrael is a glorious beacon of light Azrael is a glorious beacon of light Azrael's Avatar
    Join Date
    Aug 2007
    Posts
    1,947

    Default Re: Save only Adv Dupe?

    Yeah, you'd probably want to disable pasting, instead sending a message to the user saying that advdupe is only there to download their structures.

  3. #3
    Inactive Dabien is on a distinguished road Dabien's Avatar
    Join Date
    Feb 2008
    Location
    Manchester, UK
    Posts
    7

    Default Re: Save only Adv Dupe?

    Any idea how I'd go about disabling it? Is it just a variable, or something more?

  4. #4
    hat full of head

    Azrael is a glorious beacon of light Azrael is a glorious beacon of light Azrael is a glorious beacon of light Azrael is a glorious beacon of light Azrael is a glorious beacon of light Azrael's Avatar
    Join Date
    Aug 2007
    Posts
    1,947

    Default Re: Save only Adv Dupe?

    Right, go to Adv Duplicator\lua\weapons\gmod_tool\stools\adv_duplic ator.lua and open it up. Delete the TOOL:LeftClick() function and replace it with:
    Code:
    function TOOL:LeftClick( trace )
    	if(CLIENT) then return false end
    	ply:PrintMessage(HUD_PRINTTALK, "You cannot paste here, you can only save it and download it.")
    end
    

  5. #5
    Inactive Dabien is on a distinguished road Dabien's Avatar
    Join Date
    Feb 2008
    Location
    Manchester, UK
    Posts
    7

    Default Re: Save only Adv Dupe?

    Perfect, thanks you very much, everyone at TT Stranded will thank you

  6. #6
    Inactive Dabien is on a distinguished road Dabien's Avatar
    Join Date
    Feb 2008
    Location
    Manchester, UK
    Posts
    7

    Default Re: Save only Adv Dupe?

    Hmmm... Seems to almost have it, I'm getting:

    'weapons\gmod_tool\stools/adv_duplicator.lua:52: attempt to index global 'ply' (a nil value)'

    in console on left click atm. Line 52 is the start of the code you gave me. It stops the left click, but instead of a printed message, just console spams. Any ideas

    Edit: It works fine by dropping out the 'ply:PrintMessage(HUD_PRINTTALK, "You cannot paste here, you can only save it and download it.")'' line, but I would rather have it print a message still.
    Last edited by Dabien; 10-02-2008 at 11:01 AM.

  7. #7
    Inactive CAANz is on a distinguished road CAANz's Avatar
    Join Date
    Mar 2008
    Location
    On the planet Earth... Simple is that.
    Posts
    349

    Default Re: Save only Adv Dupe?

    Don't Read This!
    [url=http://www.userbars.com][img]http://img27.imageshack.us/img27/3774/userbar720425ch9.gif[/img][/url]

  8. #8
    hat full of head

    Azrael is a glorious beacon of light Azrael is a glorious beacon of light Azrael is a glorious beacon of light Azrael is a glorious beacon of light Azrael is a glorious beacon of light Azrael's Avatar
    Join Date
    Aug 2007
    Posts
    1,947

    Default Re: Save only Adv Dupe?

    Oops!
    Code:
    function TOOL:LeftClick( trace )
    	if(CLIENT) then return false end
    	self:GetOwner():PrintMessage(HUD_PRINTTALK, "You cannot paste here, you can only save it and download it.")
    	return false
    end
    

+ Reply to Thread

Similar Threads

  1. New kind of Adv Dupe save thingy?
    By Jat Goodwin in forum Ideas & Suggestions
    Replies: 13
    Last Post: 01-18-2009, 02:00 AM
  2. Adv Dupe does not save Address Bus Values
    By Free Fall in forum Bug Reports
    Replies: 3
    Last Post: 05-14-2008, 06:52 AM
  3. Fix corrupted adv.dupe save?
    By Christoffer in forum Technical Support
    Replies: 2
    Last Post: 09-22-2007, 06:33 AM
  4. Adv-Dupe ERROR: Failed to save file
    By sparky222b in forum Technical Support
    Replies: 2
    Last Post: 08-06-2007, 04:03 PM
  5. Adv. Dupe. doesn't want to save
    By Rhyok in forum Technical Support
    Replies: 2
    Last Post: 07-05-2007, 06:24 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
proceed-collector
proceed-collector
proceed-collector
proceed-collector
linguistic-parrots
linguistic-parrots
linguistic-parrots
linguistic-parrots