[YARDIM] Pedlere İsim Verme

0 Üye ve 1 Ziyaretçi konuyu incelemekte.

Çevrimdışı Speaw

  • Yeni Üye
  • *
    • İleti: 69
: 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

« Son Düzenleme: 06 Temmuz 2017, 19:34:30 Gönderen: Narkoz »
 


MTASATURK

[YARDIM] Pedlere İsim Verme
« : 06 Temmuz 2017, 16:43:10 »

Çevrimdışı #Serius

  • Uzman Üye
  • *
    • İleti: 685
Yanıtla #1 : 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
 


Çevrimdışı Speaw

  • Yeni Üye
  • *
    • İleti: 69
Yanıtla #2 : 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