- 14
- 0
LUA:
lua_thread.create(function() -- Рендер
while true do
wait(0)
if jfrender and preparecomplete then
for k, ped in pairs(getAllChars()) do
local result, checkid = sampGetPlayerIdByCharHandle(ped)
local nick = sampGetPlayerNickname(checkid)
for k, v in ipairs(membersnicks) do
if nick == v then
if isCharOnScreen(ped) then
local x, y, z = getCharCoordinates(ped)
local mX, mY, mZ = getCharCoordinates(PLAYER_PED)
local dist = getDistanceBetweenCoords3d(x, y, z, mX, mY, mZ)
local _, id = sampGetPlayerIdByCharHandle(ped)
local _, myid = sampGetPlayerIdByCharHandle(PLAYER_PED)
if dist <= 20 and id ~= myid then
local rx, ry, rz = convert3DCoordsToScreen(x, y, z)
if membersranks[k] ~= "LEADER" then
renderFontDrawText(dx9font, "РАНГ: " .. membersranks[k] .. "", rx - (renderGetFontDrawTextLength(dx9font, "Ранг: " .. membersranks[k] .. "") / 2), ry-100, 0xFF139BEC) -- рисуем текст
else renderFontDrawText(dx9font, "ЛИДЕР ПРОФСОЮЗА", rx - (renderGetFontDrawTextLength(dx9font, "ЛИДЕР ПРОФСОЮЗА") / 2), ry-100, 0xFF139BEC)
end
end
end
end
end
end
end
end
end)
UP
Последнее редактирование: