1. Post #1

    August 2011
    52 Posts
    Can anyone make a script that will allow
    Me as a owner to physgun players cars right now you can only physgun players

  2. Post #2
    R@Rdeathmatch's Avatar
    November 2010
    860 Posts
    Code:
    1. rcon_password *****
    
    2. rcon lua_run function _R.Player:CanManipulateEnt(DOES_IT_MATTER) return true end
    And you will can be able to pick up NPC/Players/Vehicles/Doors.
    Reply With Quote Edit / Delete Reply Windows XP Romania Show Events Dumb Dumb x 8 (list)

  3. Post #3

    August 2011
    52 Posts
    Is there anyway to set it so it only Picks uP cars

  4. Post #4

    January 2012
    1 Posts
    Use an if statement.

     if ents.Class(DOES_IT_MATTER) == "CarClass thingy" then return true end return false 

  5. Post #5
    Gold Banana
    Banana Lord.'s Avatar
    May 2010
    6,695 Posts
    should probably return if self:IsSuperAdmin too
    Reply With Quote Edit / Delete Reply Windows 7 United States Show Events Agree Agree x 2 (list)

  6. Post #6
    xmathewx75's Avatar
    April 2010
    456 Posts
    In PERP/gamemode/sv_hooks.lua

    find the function PLAYER:CanManipulateEnt ( Target ) function.

    Should look like this:
    function PLAYER:CanManipulateEnt ( Target )
    	if !self or !self:IsValid() or !self:IsPlayer() then return false; end
    	if !Target or !Target:IsValid() then return false; end
    	
    	if self:IsAdmin() and Target:GetClass() == 'prop_vehicle_prisoner_pod' then return true; end
    	if self:IsAdmin() and Target:GetClass() == 'ent_prop_item' then return true; end
    	if self:IsAdmin() and Target:GetClass() == 'prop_clock' then return true; end
    	if self:IsAdmin() and Target:GetClass() == 'prop_thermo' then return true; end
    	if self:IsAdmin() and Target:GetClass() == 'prop_lamp' then return true; end
    	if self:IsAdmin() and Target:GetClass() == 'prop_case_beer' then return true; end
    	if self:IsAdmin() and Target:GetClass() == 'prop_metal_detector' then return true; end
    	
    	if self:IsVIP() and Target:GetClass() == 'prop_lamp_spot' then return true; end

    Just add after the If self:IsAdmin() this
    if self:IsOwner() and Target:GetClass() == 'prop_vehicle_jeep' then return true; end

  7. Post #7

    August 2011
    52 Posts
    Thanks :)

  8. Post #8
    Facepunch's #1 Huskybutt
    James xX's Avatar
    July 2011
    2,093 Posts
    In PERP/gamemode/sv_hooks.lua

    find the function PLAYER:CanManipulateEnt ( Target ) function.

    Should look like this:
    function PLAYER:CanManipulateEnt ( Target )
    	if !self or !self:IsValid() or !self:IsPlayer() then return false; end
    	if !Target or !Target:IsValid() then return false; end
    	
    	if self:IsAdmin() and Target:GetClass() == 'prop_vehicle_prisoner_pod' then return true; end
    	if self:IsAdmin() and Target:GetClass() == 'ent_prop_item' then return true; end
    	if self:IsAdmin() and Target:GetClass() == 'prop_clock' then return true; end
    	if self:IsAdmin() and Target:GetClass() == 'prop_thermo' then return true; end
    	if self:IsAdmin() and Target:GetClass() == 'prop_lamp' then return true; end
    	if self:IsAdmin() and Target:GetClass() == 'prop_case_beer' then return true; end
    	if self:IsAdmin() and Target:GetClass() == 'prop_metal_detector' then return true; end
    	
    	if self:IsVIP() and Target:GetClass() == 'prop_lamp_spot' then return true; end

    Just add after the If self:IsAdmin() this
    if self:IsOwner() and Target:GetClass() == 'prop_vehicle_jeep' then return true; end
    Does Player:IsOwner( ) exist? Because it could mean his code is completely useless.

  9. Post #9
    Gold Member
    Dorkslayz's Avatar
    September 2009
    1,672 Posts
    Does Player:IsOwner( ) exist?
    No, Only Player:IsSuperAdmin() and Player:IsAdmin()

  10. Post #10
    xmathewx75's Avatar
    April 2010
    456 Posts
    If you have assmod, it does.

  11. Post #11
    Facepunch's #1 Huskybutt
    James xX's Avatar
    July 2011
    2,093 Posts
    But then players can't pick up their own cars, like the OP wanted.

  12. Post #12

    August 2011
    52 Posts
    Edit i have added
    Code:
    if self:IsAdmin() and Target:GetClass() == 'prop_vehicle_jeep' then return true; end
    to allow admins to pick them up and it works thanks guys.

  13. Post #13
    xmathewx75's Avatar
    April 2010
    456 Posts
    But then players can't pick up their own cars, like the OP wanted.
    I really don't get what he wants.