position это объект ffi, ты не можешь его объявить как таблицу. убери функцию function…
- User
position это объект ffi, ты не можешь его объявить как таблицу. убери функцию function create3dText(id, text, color, limbZOffset)
-- Hook for Customizing EndHealthBar local function endHealthBarHook(playerTags) destroyDefined3DTexts() print("3D texts destroyed.")
local charX, charY, charZ = getCharCoordinates(playerPed) print("Character coordinates:", charX, charY, charZ) local limbX, limbY, limbZ = getBodyPartCoords(8, playerPed) print("Limb coordinates:", limbX, limbY, limbZ) local cameraX, cameraY, cameraZ = getActiveCameraCoordinates() print("Camera coordinates:", cameraX, cameraY, cameraZ) local cameraDistance = getDistanceBetweenCoords3d(charX, charY, charZ, cameraX, cameraY, cameraZ) print("Camera distance:", cameraDistance) local success, playerId = sampGetPlayerIdByCharHandle(playerPed) if not success then print("Failed to get player ID.") return EndHealthBar(playerTags) end print("Player ID:", playerId) local nickname = sampGetPlayerNickname(playerId) print("Nickname:", nickname) local color = sampGetPlayerColor(playerId) + 0xFF000000 print("Color with alpha:", string.format("0x%X", color)) local text = string.format("%s (%d)", nickname, playerId) print("Text for 3D display:", text) local measuredSize = measureTextSize(text) print("Text size:", measuredSize.cx, measuredSize.cy) local offset = calculateVerticalAlignmentCorrection(measuredSize.cy) print("Vertical alignment offset:", offset)print"do" local function create3dText(id, text, color, limbZOffset) sampCreate3dTextEx(id, text, color, limbX, limbY, limbZ + limbZOffset, SAMP_TEXT_DISTANCE, false, -1, -1) print(string.format("3D Text created: %s at offset %.2f", text, limbZOffset)) end print"posle"
position.x, position.y, position.z = limbX, limbY, limbZ drawHealthBar(playerTags, position, sampGetPlayerHealth(playerId), sampGetPlayerArmor(playerId), cameraDistance) print("Health bar drawn at position:", position.x, position.y, position.z) local verticalOffset = 0.21 + (cameraDistance * 0.0475 * offset) print("Vertical offset calculated:", verticalOffset) create3dText(NICKNAME_ID, text, color, verticalOffset) create3dText(BUBBLE_ID, "{d0aeeb} * смотрите, я ролевик", 0xFFFFFFFF, verticalOffset + 0.2) return EndHealthBar(playerTags)end почини высоту бабла
- Assistant