Jump to content

[URGENT] setPedHeadless


ServerBoss

Recommended Posts

I have written a small code and its not working how it should, its a script to remove a players head on death if headshot (bodypart 9) but its only showing the player who was killed. I need this function to visually remove the player's head for all players, it was written serverside.

function removeHead (thePlayer, bodypart ) 
    if (bodypart == 9) then 
        setPedHeadless(thePlayer, true) 
    end 
end 
addEventHandler ( "onPlayerWasted", getRootElement(), removeHead ) 

I need this solved as soon as posible.

Regards

Serverboss

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...