Results 1 to 8 of 8
  1. #1
    Rampant_uterus's Avatar
    Join Date
    Sep 2008
    Gender
    male
    Posts
    644
    Reputation
    7
    Thanks
    136

    ... Where'd the thread go for bindable keys .dll? ....

    I don't care the reason, (unless i'm blind) But good content thread removed (unless virus) is retarded. Back on topic w/ that thread

    How do I add an on/off script for this (off in main script, on in secondary script)
    Code:
    function TimerGui:_set_jamming_values() return end
    function TimerGui:start( timer )
            timer = 0.01
            if self._jammed then
                    self:_set_jammed( false )
                    return
            end
           
            if not self._powered then
                    self:_set_powered( true )
                    return
            end
           
            if self._started then
                    return
            end
           
            self:_start( timer )
            if managers.network:session() then
                    managers.network:session():send_to_peers_synched( "start_timer_gui", self._unit, timer )
            end
    end
    Also, which of these are actually necessary for infinite equipment (host/non-host)

    also I don't remember how to even make on/off code for single line scripts because the tut aspect of it was posted in that thread... ffs!

    Code:
    function PlayerManager:remove_equipment( equipment_id ) end
    function PlayerManager:remove_equipment_possession( peer_id, equipment ) end
    function PlayerManager:clear_equipment() end
    function PlayerManager:from_server_equipment_place_result( selected_index, unit ) end
    function HUDManager:remove_special_equipment( equipment ) end
    because infinite equipment is needed to use
    Code:
    -- BaseInteractionExt._has_required_deployable = function(self) return true end -- TURN OFF FOR MP******************
    
    -- Allow interaction with anything (ECM jammers, picking locks, deploying shaped charges, etc)
    function BaseInteractionExt:_has_required_deployable() return true end
    without the equipment equipped

    thx for the help guys.

  2. #2
    dougbenham's Avatar
    Join Date
    Jul 2011
    Gender
    male
    Posts
    134
    Reputation
    119
    Thanks
    1,083
    My Mood
    Pensive
    The mods keep deleting my DLL because it contains "advertising" for other forums. I give proper credits to those who helped create the DLL and the mods don't like that. I might post the DLL here some other time. For now, just obtain the DLL from other forums, you can find my post on other forums by googling:
    "[RELEASE] iphlpapi.dll with error logging and allows configurable hotkeys transcend".

    Here is the guide you are referring to:
    Quote Originally Posted by RabidFubar View Post
    The scripts generally declare new functions to overwrite existing functions. If you want to be able to disable your scripts, you need add code so when you enable the script it backs up the original function to a new name. To disable your script, you need to then restore the original function. For my drill code, I used more than one line because I couldn't just have the new function return true, false, or zero. It is still one function (well, 2 if you count jamming).

    Enable drilling:
    Code:
    if not _oldJamming then _oldJamming = TimerGui._set_jamming_values end
    function TimerGui:_set_jamming_values() return end
    
    if not _oldStart then _oldStart = TimerGui.start end
    function TimerGui:start( timer )
            timer = 0.01
            if self._jammed then
                    self:_set_jammed( false )
                    return
            end
           
            if not self._powered then
                    self:_set_powered( true )
                    return
            end
           
            if self._started then
                    return
            end
           
            self:_start( timer )
            if managers.network:session() then
                    managers.network:session():send_to_peers_synched( "start_timer_gui", self._unit, timer )
            end
    end
    Disable drilling:
    Code:
    if _oldJamming then 
    	TimerGui._set_jamming_values = _oldJamming 
    	_oldJamming = nil
    end
    
    if _oldStart then 
    	TimerGui.start = _oldStart
    	_oldStart = nil
    end
    As you can see above, I copy the old jamming and timer functions to the placeholders named _oldJamming and _oldStart before I replace the original functions. The disable code checks to see if the script is enabled (if a placeholder exists the script is enabled), copies the placeholder back to the original function, and deletes the placeholder.

    For scripts with more sweeping changes, such as invisibility, you need to do this with each function.

  3. #3
    Rampant_uterus's Avatar
    Join Date
    Sep 2008
    Gender
    male
    Posts
    644
    Reputation
    7
    Thanks
    136
    thanks alot man, gonna use this to set more enable/disable on scripts

  4. #4
    Rampant_uterus's Avatar
    Join Date
    Sep 2008
    Gender
    male
    Posts
    644
    Reputation
    7
    Thanks
    136
    I'm doing something wrong =/

    Enable:
    Code:
    if not _Rem1 then _Rem1 = PlayerManager:remove_equipment end
    function PlayerManager:remove_equipment( equipment_id ) end
    
    if not _Rem2 then _Rem2 = PlayerManager:remove_equipment_possession end
    function PlayerManager:remove_equipment_possession( peer_id, equipment ) end
    
    if not _Rem3 then _Rem3 = PlayerManager:clear_equipment end
    function PlayerManager:clear_equipment() end
    
    if not _Rem4 then _Rem4 = PlayerManager:from_server_equipment_place_result end
    function PlayerManager:from_server_equipment_place_result( selected_index, unit ) end
    
    if not _Rem5 then _Rem5 = HUDManager:remove_special_equipment end
    function HUDManager:remove_special_equipment( equipment ) end
    
    if not _Base1 then _Base1 = BaseInteractionExt._has_required_deployable end -- TURN OFF FOR MP************************************
    BaseInteractionExt._has_required_deployable = function(self) return true end
    Disable:
    Code:
    if _Rem1 then 
    	PlayerManager:remove_equipment = _Rem1
    	_Rem1 = nil
    end
    
    if _Rem2 then
    	PlayerManager:remove_equipment_possession = _Rem2
    	_Rem2 = nil
    end
    
    if _Rem3 then
    	PlayerManager:clear_equipment = _Rem3
    	_Rem3 = nil
    end
    
    if _Rem4 then
    	PlayerManager:from_server_equipment_place_result = _Rem4
    	_Rem4 = nil
    end
    
    if _Rem5 then
    	HUDManager:remove_special_equipment = _Rem5
    	_Rem5 = nil
    end
    
    -- Allow interaction with anything (ECM jammers, picking locks, deploying shaped charges, etc)
    -- if _Base2 then BaseInteractionExt:_has_required_deployable() return true end
    if _Base1 then
    	BaseInteractionExt._has_required_deployable = _Base1
    	_Base1 = nil
    end

  5. #5
    dougbenham's Avatar
    Join Date
    Jul 2011
    Gender
    male
    Posts
    134
    Reputation
    119
    Thanks
    1,083
    My Mood
    Pensive
    Quote Originally Posted by Rampant_uterus View Post
    I'm doing something wrong =/

    Enable:
    Code:
    if not _Rem1 then _Rem1 = PlayerManager:remove_equipment end
    function PlayerManager:remove_equipment( equipment_id ) end
    
    if not _Rem2 then _Rem2 = PlayerManager:remove_equipment_possession end
    function PlayerManager:remove_equipment_possession( peer_id, equipment ) end
    
    if not _Rem3 then _Rem3 = PlayerManager:clear_equipment end
    function PlayerManager:clear_equipment() end
    
    if not _Rem4 then _Rem4 = PlayerManager:from_server_equipment_place_result end
    function PlayerManager:from_server_equipment_place_result( selected_index, unit ) end
    
    if not _Rem5 then _Rem5 = HUDManager:remove_special_equipment end
    function HUDManager:remove_special_equipment( equipment ) end
    
    if not _Base1 then _Base1 = BaseInteractionExt._has_required_deployable end -- TURN OFF FOR MP************************************
    BaseInteractionExt._has_required_deployable = function(self) return true end
    Disable:
    Code:
    if _Rem1 then 
    	PlayerManager:remove_equipment = _Rem1
    	_Rem1 = nil
    end
    
    if _Rem2 then
    	PlayerManager:remove_equipment_possession = _Rem2
    	_Rem2 = nil
    end
    
    if _Rem3 then
    	PlayerManager:clear_equipment = _Rem3
    	_Rem3 = nil
    end
    
    if _Rem4 then
    	PlayerManager:from_server_equipment_place_result = _Rem4
    	_Rem4 = nil
    end
    
    if _Rem5 then
    	HUDManager:remove_special_equipment = _Rem5
    	_Rem5 = nil
    end
    
    -- Allow interaction with anything (ECM jammers, picking locks, deploying shaped charges, etc)
    -- if _Base2 then BaseInteractionExt:_has_required_deployable() return true end
    if _Base1 then
    	BaseInteractionExt._has_required_deployable = _Base1
    	_Base1 = nil
    end
    Close.. you need to understand the difference between : and .

    <class>:<function>(<params>) is shorthand for <class>.<function>(self, <params>)

    So when you are storing a function in a variable.. you want to do this:
    Code:
    if not _Rem1 then _Rem1 = PlayerManager.remove_equipment end
    And when restoring:
    Code:
    if _Rem1 then 
    	PlayerManager.remove_equipment = _Rem1
    	_Rem1 = nil
    end
    If you are calling the functions, you use the :

    Let me know if it needs more explaining.

  6. #6
    Rampant_uterus's Avatar
    Join Date
    Sep 2008
    Gender
    male
    Posts
    644
    Reputation
    7
    Thanks
    136
    do i need to keep the params when I'm setting a name for it? like:

    _Rem1 Code( param ) end

    if it has equipment or peerid in the params

  7. #7
    dougbenham's Avatar
    Join Date
    Jul 2011
    Gender
    male
    Posts
    134
    Reputation
    119
    Thanks
    1,083
    My Mood
    Pensive
    Quote Originally Posted by Rampant_uterus View Post
    do i need to keep the params when I'm setting a name for it? like:

    _Rem1 Code( param ) end

    if it has equipment or peerid in the params
    No, just do it like I showed.

  8. #8
    Rampant_uterus's Avatar
    Join Date
    Sep 2008
    Gender
    male
    Posts
    644
    Reputation
    7
    Thanks
    136
    almost 6am, need sleep DX

Similar Threads

  1. [Solved] Where is the download link for VMware ? :)
    By TerrorXStrike in forum CrossFire Help
    Replies: 2
    Last Post: 09-05-2012, 08:07 PM
  2. [Solved] Where is the VIP section for WarRock hack?
    By djnitro11 in forum WarRock Help
    Replies: 1
    Last Post: 08-30-2011, 04:21 PM
  3. Does any one know where is the Server.cfg for private host matches?
    By ph1yjai in forum Call of Duty Black Ops Discussions
    Replies: 3
    Last Post: 11-13-2010, 02:59 AM
  4. where is the .DTX file for Max's hands?-
    By David in forum Combat Arms Mod Request
    Replies: 6
    Last Post: 09-05-2010, 04:59 PM
  5. idk what is the thread for :=)
    By n1stelrooy in forum Spammers Corner
    Replies: 0
    Last Post: 01-07-2008, 12:44 PM