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