Results 1 to 3 of 3
  1. #1
    frostyshield's Avatar
    Join Date
    Oct 2013
    Gender
    male
    Location
    UK
    Posts
    21
    Reputation
    10
    Thanks
    0

    [Request]LUA show every camera/civ/guard but without anyone else seeing them?

    Ok so I have got a LUA script that shows every camera/civ/guard but other players can see them I have tried turning changing the stuff that are true to false but it still isn't helping. If anyone can help me here it would be a massive help!


    Code:
    	-- Set colors
    	managers.game_play_central._enemy_contour_units[unit:key()].color = color
    	managers.game_play_central._enemy_contour_units[unit:key()].target_color = target_color
    end
    function mark_enemies()
    	local units = World:find_units_quick( "all", 3, 16, 21, managers.slot:get_mask( "enemies" ) )
    	for i,unit in ipairs( units ) do
    		if not unit:brain() or not unit:brain()._logic_data or
    		   not unit:brain()._logic_data.objective or
    		   (unit:brain()._logic_data.objective.type ~= "surrender" and 
    		    unit:brain()._logic_data.objective.type ~= "follow") then
    		      	if tweak_data.character[ unit:base()._tweak_table ].silent_priority_shout then
    		      		managers.game_play_central:add_enemy_contour( unit, true )
    		      	 managers.network:session():send_to_peers_synched( "mark_enemy", unit, false )
    				setEnemyColor(unit)
    		      	elseif unit:character_damage().on_marked_state then
    		      		managers.game_play_central:add_enemy_contour( unit, true )
    		      		managers.network:session():send_to_peers_synched( "mark_enemy", unit, false )
    				setEnemyColor(unit)
    		      	end
    		end
    	end
    
    	for u_key, unit in pairs( managers.groupai:state()._security_cameras ) do
    		managers.game_play_central:add_marked_contour_unit( unit )
    		managers.network:session():send_to_peers_synched( "mark_contour_unit", unit )
    	end
    end
    
    
    _markingToggle = not _markingToggle
    if not _gameUpdateLastMark then _gameUpdateLastMark = nil end
    local _gameUpdate = Interception.Backup(GameSetup, "update")
    function GameSetup:update( t, dt )
    	local result = _gameUpdate(self, t, dt)
    	
    	if _markingToggle and (not _gameUpdateLastMark or t - _gameUpdateLastMark > 4) then
    		_gameUpdateLastMark = t
    		mark_enemies()
    	end
    
    	return result
    end
    Last edited by frostyshield; 10-17-2013 at 03:05 PM.

  2. #2
    dougbenham's Avatar
    Join Date
    Jul 2011
    Gender
    male
    Posts
    134
    Reputation
    119
    Thanks
    1,083
    My Mood
    Pensive
    Remove lines starting with 'managers.network:session():send_to_peers_synched' .

  3. #3
    R$GE#HYGaerhearhearh's Avatar
    Join Date
    Dec 2010
    Gender
    male
    Posts
    11
    Reputation
    10
    Thanks
    0
    Code:
    -- Coloring functions
    function setEnemyColor(unit)
      local enemyType = unit:base()._tweak_table
      local color, target_color
      
      -- Civilians | Green
      if enemyType == "civilian" or enemyType == "civilian_female" then
        color = Vector3( 0.1687, 0.5529, 0 )
        target_color = Vector3( 0.1688, 0.5529, 0 )
      -- Taser | Blue
      elseif enemyType == "taser" then
        color = Vector3(0, 0.3804, 0.6235)
        target_color = Vector3(0.001, 0.3804, 0.6235)
      -- Shield | Orange
      elseif enemyType == "shield" then
        color = Vector3(1, 0.5, 0)
        target_color = Vector3(1.001, 0.5, 0)
      -- Tank | Yellow
      elseif enemyType == "tank" then
        color = Vector3(1, 1, 0)
        target_color = Vector3(1.001, 1, 0)
      -- Sniper | Pink
      elseif enemyType == "sniper" then
        color = Vector3(1, 0.35, 0.35)
        target_color = Vector3(1.001, 0.35, 0.35)
      -- Cop/unknown | Purple
      else
        color = Vector3(0.5216, 0, 0.5529)
        target_color = Vector3(0.5217, 0, 0.5529)
      end
      
      -- Set colors
      managers.game_play_central._enemy_contour_units[unit:key()].color = color
      managers.game_play_central._enemy_contour_units[unit:key()].target_color = target_color
    end
    
    -- Marking enemies
    function mark_enemies()
      local units = World:find_units_quick( "all", 3, 16, 21, managers.slot:get_mask( "enemies" ) )
      for i,unit in ipairs( units ) do
        if not unit:brain() or not unit:brain()._logic_data or
           not unit:brain()._logic_data.objective or
           (unit:brain()._logic_data.objective.type ~= "surrender" and 
            unit:brain()._logic_data.objective.type ~= "follow") then
          if tweak_data.character[ unit:base()._tweak_table ].silent_priority_shout then
              managers.game_play_central:add_enemy_contour( unit, false )
              --managers.network:session():send_to_peers_synched( "mark_enemy", unit, true )
              --setEnemyColor(unit)
          elseif unit:character_damage().on_marked_state then
              managers.game_play_central:add_enemy_contour( unit, false )
              --managers.network:session():send_to_peers_synched( "mark_enemy", unit, false )
            setEnemyColor(unit)
          end
        end
      end
      
      -- Cameras (HOST ONLY)
      for u_key, unit in pairs( managers.groupai:state()._security_cameras ) do
        managers.game_play_central:add_marked_contour_unit( unit )
        managers.network:session():send_to_peers_synched( "mark_contour_unit", unit )
      end
    end
    
    -- Game only
    if managers.hud then
      -- Toggle visible
      managers.game_play_central._highlightHackEnabled = not managers.game_play_central._highlightHackEnabled
    
      if not _gameUpdate then _gameUpdate = GameSetup.update end
      do
        local _gameUpdateLastMark
        function GameSetup:update( t, dt )
          _gameUpdate(self, t, dt);
        
          if (not _gameUpdateLastMark or t - _gameUpdateLastMark > 4)
             and managers.game_play_central._highlightHackEnabled then
            _gameUpdateLastMark = t
            mark_enemies()
          end
        end
      end
      
      -- End alert
      if managers.game_play_central._highlightHackEnabled then
        managers.hud:show_hint( { text = "Enemies status: visible" } )
      else
        managers.hud:show_hint( { text = "Enemies status: hidden" } )
      end
      managers.menu_component:post_event("menu_enter")
    end
    This is toggleable that only you can see.

Similar Threads

  1. [REQUEST].LUA for more XP at end of heist
    By Teraku in forum Payday 2 Hacks & Cheats
    Replies: 2
    Last Post: 09-08-2013, 11:48 AM
  2. [Request] .LUA for adding XP
    By scottykai in forum Payday 2 Hacks & Cheats
    Replies: 2
    Last Post: 09-02-2013, 02:39 PM
  3. [Request]List of every code to reduce lag
    By mastermods in forum Combat Arms Hack Coding / Programming / Source Code
    Replies: 8
    Last Post: 07-24-2010, 06:52 AM
  4. I've downloaded hacks but how do I work them?
    By TheMan@hotmail in forum Combat Arms Help
    Replies: 5
    Last Post: 07-06-2010, 06:15 AM
  5. Replies: 5
    Last Post: 09-14-2009, 06:34 AM