biraz beklersen kodları atarım hemen vazgeçme bence.
wikideki örnekteki gibi cj evinin önünde biraz kodlara bakarsan çözersin. biraz çorba oldu ama :3
ped1 = createPed(285,2476.91406,-1665.31799,13.32435)
ped2 = createPed(260,2480,-1665.31799,13.32435)
addEventHandler("onClientRender", getRootElement(),
function ()
dxDrawTextOnElement(ped1,"Sunucuya hoşgeldiniz, #EA852C".. getPlayerName(getLocalPlayer()),1,20,255,255,255,255,1.5,"default-bold")
dxDrawTextOnElement(ped2,"Sunucuda şuan, #EA852C"..#getElementsByType("player").."#FFFFFF oyuncu bulunmakta.",1,20,255,255,255,255,1.5,"default-bold")
end)
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
dxDrawBorderedText(text, sx+2, sy+2, sx, sy, tocolor(R or 255, G or 255, B or 255, alpha or 255), (size or 2)-(distanceBetweenPoints / distance),1, font or "arial", "center", "center")
end
end
end
end
function dxDrawBorderedText(text, left, top, right, bottom, color, scale, outlinesize, font, alignX, alignY, clip, wordBreak, postGUI, colorCoded)
local outlinesize = math.min(scale, outlinesize)
if outlinesize > 0 then
for offsetX=-outlinesize,outlinesize,outlinesize do
for offsetY=-outlinesize,outlinesize,outlinesize do
if not (offsetX == 0 and offsetY == 0) then
dxDrawText(text:gsub("#%x%x%x%x%x%x",""), left+offsetX, top+offsetY, right+offsetX, bottom+offsetY, tocolor(0, 0, 0, 255), scale, font, alignX, alignY, clip, wordBreak, postGUI)
end
end
end
end
dxDrawText(text, left, top, right, bottom, color, scale, font, alignX, alignY, clip, wordBreak, postGUI, true)
end
function cancelPedDamage()
cancelEvent()
setElementFrozen ( source, true )
end
addEventHandler("onClientPedDamage", root, cancelPedDamage)