Witam, chcia?bym prosi? o pomoc mianowicie jestem do?? zielony, je?eli chodzi o lua. Chcia?bym, aby nad markerem, kt?ry stworzy?em pojawi? si? napis, a nie wiem jak sprawi?, aby tak si? sta?o. M?g?by kto? pom?c prosz??
To kod ca?ego skryptu (XD):
I co mam za magie natworzy? ?eby doda? do tego tekst. Prosz? pomocy.
Zamiast x,y,z dawa?em te? kordy to nie dzia?a?o w sumie logiczne, ale nie dzia?a dalej nawet jak jest tak. Element te? zostawia?em wcze?niej tam zamiast sapdDutyMarker tak jak by?o i te? nie dzia?a?o.
Problem polega na tym, ?e ju? na to spogl?da?em i nawet kopiowa?em bezpo?rednio kod ze strony i tak czy siak mi nie dzia?a. Nie wiem o co chodzi.
function dxDrawTextOnElement(TheElement,text,height,distance,R,G,B,alpha,size,font,...)
local x, y, z = getElementPosition(TheElement)
local x2, y2, z2 = getCameraMatrix()
local distance = distance or 20
local height = height or 1
if (isLineOfSightClear(x, y, z+2, x2, y2, z2, ...)) then
local sx, sy = getScreenFromWorldPosition(x, y, z+height)
if(sx) and (sy) then
local distanceBetweenPoints = getDistanceBetweenPoints3D(x, y, z, x2, y2, z2)
if(distanceBetweenPoints < distance) then
dxDrawText(text, sx+2, sy+2, sx, sy, tocolor(R or 255, G or 255, B or 255, alpha or 255), (size or 1)-(distanceBetweenPoints / distance), font or "arial", "center", "center")
end
end
end
end
local x, y, z = getElementPosition(localPlayer)
local randomPed = createPed(285, x + math.random(5), y + math.random(3), z)
Problem polega na tym, ?e ju? na to spogl?da?em i nawet kopiowa?em bezpo?rednio kod ze strony i tak czy siak mi nie dzia?a. Nie wiem o co chodzi.
function dxDrawTextOnElement(TheElement,text,height,distance,R,G,B,alpha,size,font,...)
local x, y, z = getElementPosition(TheElement)
local x2, y2, z2 = getCameraMatrix()
local distance = distance or 20
local height = height or 1
if (isLineOfSightClear(x, y, z+2, x2, y2, z2, ...)) then
local sx, sy = getScreenFromWorldPosition(x, y, z+height)
if(sx) and (sy) then
local distanceBetweenPoints = getDistanceBetweenPoints3D(x, y, z, x2, y2, z2)
if(distanceBetweenPoints < distance) then
dxDrawText(text, sx+2, sy+2, sx, sy, tocolor(R or 255, G or 255, B or 255, alpha or 255), (size or 1)-(distanceBetweenPoints / distance), font or "arial", "center", "center")
end
end
end
end
local x, y, z = getElementPosition(localPlayer)
local randomPed = createPed(285, x + math.random(5), y + math.random(3), z)
Problem polega na tym, ?e ju? na to spogl?da?em i nawet kopiowa?em bezpo?rednio kod ze strony i tak czy siak mi nie dzia?a. Nie wiem o co chodzi.[/quote]
function dxDrawTextOnElement(TheElement,text,height,distance,R,G,B,alpha,size,font,...)
local x, y, z = getElementPosition(TheElement)
local x2, y2, z2 = getCameraMatrix()
local distance = distance or 20
local height = height or 1
if (isLineOfSightClear(x, y, z+2, x2, y2, z2, ...)) then
local sx, sy = getScreenFromWorldPosition(x, y, z+height)
if(sx) and (sy) then
local distanceBetweenPoints = getDistanceBetweenPoints3D(x, y, z, x2, y2, z2)
if(distanceBetweenPoints < distance) then
dxDrawText(text, sx+2, sy+2, sx, sy, tocolor(R or 255, G or 255, B or 255, alpha or 255), (size or 1)-(distanceBetweenPoints / distance), font or "arial", "center", "center")
end
end
end
end
local x, y, z = getElementPosition(localPlayer)
local randomPed = createPed(285, x + math.random(5), y + math.random(3), z)
Nie możesz pisać nowych tematów Nie możesz odpowiadać w tematach Nie możesz zmieniać swoich postów Nie możesz usuwać swoich postów Nie możesz głosować w ankietach