Neler yeni

Foruma hoş geldin, Ziyaretçi

Forum içeriğine ve tüm hizmetlerimize erişim sağlamak için foruma kayıt olmalı ya da giriş yapmalısınız. Foruma üye olmak tamamen ücretsizdir.

Türkiye'nin İlk ve tek FiveM forum adresi

Forum adresimize hoş geldin FiveMTürk olarak amacımız siz değerli kullanıcılarımıza en aktif fikir ve paylaşım platformu sunmak bir yana en güvenilir şekilde alışveriş yapabileceğiniz bir platform sunmaktır.
DF DF
DF DF
DF DF

Soru Asansör Nasıl Yapılır ? Yardımcı Olursanız Sevinirim.

  • Konbuyu başlatan Üye Silindi 17472
  • Başlangıç tarihi
  • Cevaplar 8
  • Görüntüleme 2K
Ü

Üye Silindi 17472

Guest
Asansör Nasıl Yapılır ? Yardımcı Olursanız Sevinirim.
 
DF
Asansör derken bir yerden bir yere asansör gibi gözüken ışınlanma anlamında mı?
 
DF
Kod:
function DrawText3D(x, y, z, text, scale) local onScreen, _x, _y = World3dToScreen2d(x, y, z) local pX, pY, pZ = table.unpack(GetGameplayCamCoords()) SetTextScale(scale, scale) SetTextFont(4) SetTextProportional(1) SetTextEntry("STRING") SetTextCentre(true) SetTextColour(255, 255, 255, 215) AddTextComponentString(text) DrawText(_x, _y) end

local maksimumMesafe = 3
local asansorTextBoyut = 0.40
local Asansorler = {
    [1] = { konum1 = { x = 100, y = 100, z = 10 }, konum2 = { x = 100, y = 100, z = 20 } },
    [2] = { konum1 = { x = 200, y = 200, z = 10 }, konum2 = { x = 200, y = 200, z = 20 } },
}

Citizen.CreateThread(function()
    while true do
        for _, i in pairs(Asansorler) do
            local x,y,z = table.unpack(GetEntityCoords(GetPlayerPed(-1), true))
            local dst = GetDistanceBetweenCoords(x, y, z, i.konum1.x, i.konum1.y, i.konum1.z, true)

            if dst <= maksimumMesafe then
                DrawMarker(2, i.konum1.x, i.konum1.y, i.konum1.z, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 255, 0, 40, 200, 0.0, false, true, 0.0, nil, nil, false)
                DrawText3D(i.konum1.x, i.konum1.y, i.konum1.z, "~w~[~g~E~w~] Asansor Kullan", asansorTextBoyut)
                if IsControlJustPressed(0, 38) then -- E tuşu :)
                    local ply = PlayerPedId()
                    DoScreenFadeOut(1000)
                    Citizen.Wait(1000)
                    SetEntityCoords(ply, i.konum2.x, i.konum2.y, i.konum2.z)
                    Citizen.Wait(1000)
                    DoScreenFadeIn(1000)
                end
            else
                Citizen.Wait(1000)
            end
        end
    end
end)

Citizen.CreateThread(function()
    while true do
        for _, i in pairs(Asansorler) do
            local x,y,z = table.unpack(GetEntityCoords(GetPlayerPed(-1), true))
            local dst = GetDistanceBetweenCoords(x, y, z, i.konum2.x, i.konum2.y, i.konum2.z, true)

            if dst <= maksimumMesafe then
                DrawMarker(2, i.konum2.x, i.konum2.y, i.konum2.z, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 255, 0, 40, 200, 0.0, false, true, 0.0, nil, nil, false)
                DrawText3D(i.konum2.x, i.konum2.y, i.konum2.z, "~w~[~g~E~w~] Asansor Kullan", asansorTextBoyut)
                if IsControlJustPressed(0, 38) then -- E tuşu :)
                    local ply = PlayerPedId()
                    DoScreenFadeOut(1000)
                    Citizen.Wait(1000)
                    SetEntityCoords(ply, i.konum1.x, i.konum1.y, i.konum1.z)
                    Citizen.Wait(1000)
                    DoScreenFadeIn(1000)
                end
            else
                Citizen.Wait(1100)
            end
        end
    end
end)

Denemedim ancak hata verirse söyleyebilirsin iyi forumlar.
 
DF
Kod:
function DrawText3D(x, y, z, text, scale) local onScreen, _x, _y = World3dToScreen2d(x, y, z) local pX, pY, pZ = table.unpack(GetGameplayCamCoords()) SetTextScale(scale, scale) SetTextFont(4) SetTextProportional(1) SetTextEntry("STRING") SetTextCentre(true) SetTextColour(255, 255, 255, 215) AddTextComponentString(text) DrawText(_x, _y) end

local maksimumMesafe = 3
local asansorTextBoyut = 0.40
local Asansorler = {
    [1] = { konum1 = { x = 100, y = 100, z = 10 }, konum2 = { x = 100, y = 100, z = 20 } },
    [2] = { konum1 = { x = 200, y = 200, z = 10 }, konum2 = { x = 200, y = 200, z = 20 } },
}

Citizen.CreateThread(function()
    while true do
        for _, i in pairs(Asansorler) do
            local x,y,z = table.unpack(GetEntityCoords(GetPlayerPed(-1), true))
            local dst = GetDistanceBetweenCoords(x, y, z, i.konum1.x, i.konum1.y, i.konum1.z, true)

            if dst <= maksimumMesafe then
                DrawMarker(2, i.konum1.x, i.konum1.y, i.konum1.z, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 255, 0, 40, 200, 0.0, false, true, 0.0, nil, nil, false)
                DrawText3D(i.konum1.x, i.konum1.y, i.konum1.z, "~w~[~g~E~w~] Asansor Kullan", asansorTextBoyut)
                if IsControlJustPressed(0, 38) then -- E tuşu :)
                    local ply = PlayerPedId()
                    DoScreenFadeOut(1000)
                    Citizen.Wait(1000)
                    SetEntityCoords(ply, i.konum2.x, i.konum2.y, i.konum2.z)
                    Citizen.Wait(1000)
                    DoScreenFadeIn(1000)
                end
            else
                Citizen.Wait(1000)
            end
        end
    end
end)

Citizen.CreateThread(function()
    while true do
        for _, i in pairs(Asansorler) do
            local x,y,z = table.unpack(GetEntityCoords(GetPlayerPed(-1), true))
            local dst = GetDistanceBetweenCoords(x, y, z, i.konum2.x, i.konum2.y, i.konum2.z, true)

            if dst <= maksimumMesafe then
                DrawMarker(2, i.konum2.x, i.konum2.y, i.konum2.z, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 255, 0, 40, 200, 0.0, false, true, 0.0, nil, nil, false)
                DrawText3D(i.konum2.x, i.konum2.y, i.konum2.z, "~w~[~g~E~w~] Asansor Kullan", asansorTextBoyut)
                if IsControlJustPressed(0, 38) then -- E tuşu :)
                    local ply = PlayerPedId()
                    DoScreenFadeOut(1000)
                    Citizen.Wait(1000)
                    SetEntityCoords(ply, i.konum1.x, i.konum1.y, i.konum1.z)
                    Citizen.Wait(1000)
                    DoScreenFadeIn(1000)
                end
            else
                Citizen.Wait(1100)
            end
        end
    end
end)

Denemedim ancak hata verirse söyleyebilirsin iyi forumlar.
Tamam yarın deneyeceğim fakat ben bunu nasıl bi dosya açıyım biraz anltırmısın yeniyimde
 
DF
Bir klasör oluştur resources içerisine asansor diye içine client.lua aç içine bu kodları yapıştır. Kordinatları kendi kordinatlarına göre ayarla. Daha sonra aynı dosyaya fxmanifest.lua aç içine şunları gir:

Kod:
fx_version "adamant"

game "gta5"
author "laot"

client_scripts {
    "client.lua"
}
 
DF
Bir klasör oluştur resources içerisine asansor diye içine client.lua aç içine bu kodları yapıştır. Kordinatları kendi kordinatlarına göre ayarla. Daha sonra aynı dosyaya fxmanifest.lua aç içine şunları gir:

Kod:
fx_version "adamant"

game "gta5"
author "laot"

client_scripts {
    "client.lua"
}
31337
Ben dediklerini uyguladım ve şöyle birşey yaptım sıkıntı oluştururmu
 
DF
[1] = { sonrası değil hepsini ayırman gerek hocam.
 
DF

Forumdan daha fazla yararlanmak için giriş yapın yada üye olun!

Forumdan daha fazla yararlanmak için giriş yapın veya kayıt olun!

Kayıt ol

Forumda bir hesap oluşturmak tamamen ücretsizdir.

Şimdi kayıt ol
Giriş yap

Eğer bir hesabınız var ise lütfen giriş yapın

Giriş yap

Bu konuyu görüntüleyen kullanıcılar

Tema düzenleyici

Tema özelletirmeleri

Granit arka planlar

Lütfen Javascript'i etkinleştirin!Javascript'i etkinleştirin!
// Adblock Kod Start // // Adblock Kod End//