• How Can Admins Pick People Up In Jailbreak?
    5 replies, posted
Ive Got A Jailbreak Server, I Can Spawn A Physgun And I Can Move The Maps Props But I Cant Pick People Up. Any Help?
Here, it's a fairly simply hook; on mine I have it check their actual level; for this one I just made admins able to pick up non admins. If you want to check levels, then remove && !_target:IsAdmin( ) and replace it with && _p:IsHigherLevel( _target ) and have the IsHigherLevel function return true or false depending if the player is higher than target.: garrysmod/addons/acecool/lua/autorun/admin_pickup_players.lua [lua]// // On PhysgunPickup, if the target is valid, and is a player, and the user trying to pick up the target is an admin, and the target is not an admin; allow the pickup. If the target is an admin, or the player is not, then deny it. - Josh 'Acecool' Moser // hook.Add( "PhysgunPickup", function( _p, _target ) // // Allow admins to pick up lower level players // if ( IsValid( _target ) && _target:IsPlayer( ) ) then if ( _p:IsAdmin( ) && !_target:IsAdmin( ) ) then _target:Freeze( true ); _target:SetMoveType( MOVETYPE_NOCLIP ); return true; else return false; end end end ); // // If the player did successfully pick up the target, then on drop reset their movement so they can't fly away - Josh 'Acecool' Moser // hook.Add( "PhysgunDrop", function( _p, _target ) if ( IsValid( _target ) && _target:IsPlayer( ) ) then _target:SetMoveType( MOVETYPE_WALK ); _target:Freeze( false ); end end );[/lua]
[QUOTE=Acecool;44914401]Here, it's a fairly simply hook; on mine I have it check their actual level; for this one I just made admins able to pick up non admins. If you want to check levels, then remove && !_target:IsAdmin( ) and replace it with && _p:IsHigherLevel( _target ) and have the IsHigherLevel function return true or false depending if the player is higher than target.: garrysmod/addons/acecool/lua/autorun/admin_pickup_players.lua Thanks, We Switched To Deathrun Now Will It Still Work? [lua]// // On PhysgunPickup, if the target is valid, and is a player, and the user trying to pick up the target is an admin, and the target is not an admin; allow the pickup. If the target is an admin, or the player is not, then deny it. - Josh 'Acecool' Moser // hook.Add( "PhysgunPickup", function( _p, _target ) // // Allow admins to pick up lower level players // if ( IsValid( _target ) && _target:IsPlayer( ) ) then if ( _p:IsAdmin( ) && !_target:IsAdmin( ) ) then _target:Freeze( true ); _target:SetMoveType( MOVETYPE_NOCLIP ); return true; else return false; end end end ); // // If the player did successfully pick up the target, then on drop reset their movement so they can't fly away - Josh 'Acecool' Moser // hook.Add( "PhysgunDrop", function( _p, _target ) if ( IsValid( _target ) && _target:IsPlayer( ) ) then _target:SetMoveType( MOVETYPE_WALK ); _target:Freeze( false ); end end );[/lua][/QUOTE] Sorry, Will it Work On Deathrun?
Just get ulx
[QUOTE=Icejjfish;44921243]Just get ulx[/QUOTE] Dont Work :\
[QUOTE=Acecool;44914401]Here, it's a fairly simply hook; on mine I have it check their actual level; for this one I just made admins able to pick up non admins. If you want to check levels, then remove && !_target:IsAdmin( ) and replace it with && _p:IsHigherLevel( _target ) and have the IsHigherLevel function return true or false depending if the player is higher than target.: garrysmod/addons/acecool/lua/autorun/admin_pickup_players.lua [lua]// // On PhysgunPickup, if the target is valid, and is a player, and the user trying to pick up the target is an admin, and the target is not an admin; allow the pickup. If the target is an admin, or the player is not, then deny it. - Josh 'Acecool' Moser // hook.Add( "PhysgunPickup", function( _p, _target ) // // Allow admins to pick up lower level players // if ( IsValid( _target ) && _target:IsPlayer( ) ) then if ( _p:IsAdmin( ) && !_target:IsAdmin( ) ) then _target:Freeze( true ); _target:SetMoveType( MOVETYPE_NOCLIP ); return true; else return false; end end end ); // // If the player did successfully pick up the target, then on drop reset their movement so they can't fly away - Josh 'Acecool' Moser // hook.Add( "PhysgunDrop", function( _p, _target ) if ( IsValid( _target ) && _target:IsPlayer( ) ) then _target:SetMoveType( MOVETYPE_WALK ); _target:Freeze( false ); end end );[/lua][/QUOTE] your coding style is so [b]fucking annoying[/b], i'm sorry
Sorry, you need to Log In to post a reply to this thread.