- Documentation
- Shared functions
- getElementType
Function
getElementType
Returns the element type, e.g. "player", "vehicle", "ped", "object". GUI elements have types prefixed with "gui-".
Syntax
string getElementType(element theElement)Arguments
theElementelement- The element.
Returns
The type or false.
Example
addEventHandler("onPlayerDamage", root, function(attacker)
if attacker and getElementType(attacker) == "vehicle" then
outputChatBox("Potrącił cię pojazd!", source)
end
end)