MTASATURK

Multi Theft Auto => Teknik Destek => Konuyu başlatan: Speaw - 06 Temmuz 2017, 16:43:10

Başlık: [YARDIM] Pedlere İsim Verme
Gönderen: Speaw - 06 Temmuz 2017, 16:43:10
Bende bulunan pedlere yazı eklemek istiyorum başlık gibi nasıl eklerim veya npc eklemek istiyorum ama yapamadım

(https://i.hizliresim.com/BArNgV.png)
Başlık: Ynt: [Yardım] Pedlere isim verme
Gönderen: #Serius - 06 Temmuz 2017, 17:29:00
Kod: lua
--Ped Oluşturma--

local pedMarket = createPed (20, -724.81372070313,970.06854248047,12.3168592453)


Kod: lua
addEventHandler("onClientRender", root,
function()

        -- Market Ped --
        local x, y, z = getElementPosition( pedMarket )
        local x2, y2, z2 = getElementPosition(localPlayer)
        local yakinlas = getDistanceBetweenPoints3D(x,y,z, x2, y2, z2)
        if yakinlas < 2 then
           local x2, y2, z2 = getElementPosition(localPlayer)
           local sx, sy = getScreenFromWorldPosition(x, y, z+0.9, 0.06) 
           local yakinlas = getDistanceBetweenPoints3D(x,y,z, x2, y2, z2)
           local yaziboyut = 0.9
           dxDrawText ( "Market", sx, sy - 30, sx, sy - 30, tocolor(255,255,255), math.min ( 0.3*(150/yakinlas)*1.4,1.3 - (0.5 + math.sin(math.rad(getTickCount())) / 3) / 12) * yaziboyut, "default-bold", "center", "bottom", false, false, false, true )
        end
Başlık: Ynt: [Yardım] Pedlere isim verme
Gönderen: Speaw - 06 Temmuz 2017, 17:47:13
Linki görebilmek için Kayıt olun yada Giriş yapın.
Kod: lua
--Ped Oluşturma--

local pedMarket = createPed (20, -724.81372070313,970.06854248047,12.3168592453)


Kod: lua
addEventHandler("onClientRender", root,
function()

        -- Market Ped --
        local x, y, z = getElementPosition( pedMarket )
        local x2, y2, z2 = getElementPosition(localPlayer)
        local yakinlas = getDistanceBetweenPoints3D(x,y,z, x2, y2, z2)
        if yakinlas < 2 then
           local x2, y2, z2 = getElementPosition(localPlayer)
           local sx, sy = getScreenFromWorldPosition(x, y, z+0.9, 0.06) 
           local yakinlas = getDistanceBetweenPoints3D(x,y,z, x2, y2, z2)
           local yaziboyut = 0.9
           dxDrawText ( "Market", sx, sy - 30, sx, sy - 30, tocolor(255,255,255), math.min ( 0.3*(150/yakinlas)*1.4,1.3 - (0.5 + math.sin(math.rad(getTickCount())) / 3) / 12) * yaziboyut, "default-bold", "center", "bottom", false, false, false, true )
        end
Teşekkür ederim