Skip to content

Conversation

NullLikesNothing
Copy link
Contributor

Adds a command to crucify targets & it's opposite.

@wrefgtzweve
Copy link
Member

I feel like you could spice it up a bit more with something like a harpoon or an actual multi prop cross of some sort
image

ulx.unragdollPlayer( ply )
end

if IsValid( cross ) then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use SafeRemoveEntity here

end

local rightHandID = playerRagdoll:LookupBone( "ValveBiped.Bip01_R_Hand" )
local leftHandID = playerRagdoll:LookupBone( "ValveBiped.Bip01_L_Hand" )
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gets the bone index of the given bone name, returns nothing if the bone does not exist.

These can error on models that don't have said bones, custom models from pac, outfitter w/e can cause this. Make sure to account for that.

local phys_obj = playerRagdoll:GetPhysicsObjectNum( 1 )
local boneID = 2

while IsValid( phys_obj ) do
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use a for loop in here, a error in any of this could lead to a crash


cmd.uncrucifyPlayer( prop.crucifiedPly )
end
hook.Add( "EntityRemoved", "CFC_ULX_CrucifyRemoveProp", uncrucifyOnRemove ) No newline at end of file
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure to add a newline at the end of files

ply.ragdoll:DisallowDeleting( false )
ply.ragdoll:Remove()
end
if IsValid( ply.cross ) then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could use SafeRemoveEntity here

local leftHandID = playerRagdoll:LookupBone( "ValveBiped.Bip01_L_Hand" )

local rightHandPhys = playerRagdoll:TranslateBoneToPhysBone( rightHandID )
local leftHandPhys = playerRagdoll:TranslateBoneToPhysBone( leftHandID )
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same for these, make sure to account for cases where it doesnt return what you want
image

@NullLikesNothing
Copy link
Contributor Author

Will take note of that. Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants