isPedHeadless | Multi Theft Auto: Wiki Skip to content

isPedHeadless

Client-side
Server-side
Shared

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


With this function, you can check if a ped has a head or not.

Syntax

isPedHeadless ( )

Code Examples

server

Add a command to check whether the player is a zombie or not

function checkZombie(commandName)
local player = getLocalPlayer()
-- check whether the player is headless (a zombie)
local message = isPedHeadless(player) and "Yes, you are a zombie!" or "No, you aren't a zombie yet!"
outputChatBox(message)
end
addCommandHandler("zombie", checkZombie)

See Also