- Dokumentacja
- Funkcje klienta
- getElementBonePosition
Funkcja
getElementBonePosition
Zwraca pozycję kości postaci w świecie.
Składnia
float getElementBonePosition(element theElement, int bone)Argumenty
theElementelement- Gracz albo NPC.
boneint- Numer kości (np. 8 głowa, 24 prawa dłoń).
Zwraca
x, y, z albo false.
Przykład
addEventHandler("onClientRender", root, function()
for _, p in ipairs(getElementsByType("player")) do
local x, y, z = getElementBonePosition(p, 8)
if x then
local sx, sy = getScreenFromWorldPosition(x, y, z + 0.3)
if sx then dxDrawText(getPlayerName(p), sx, sy) end
end
end
end)