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

Yardım reload-skillbar Durma sorunu

  • Konbuyu başlatan keke31
  • Başlangıç tarihi
  • Cevaplar 5
  • Görüntüleme 1K

keke31

Üye
FT Kullanıcı
Katılım
4 yıl 7 ay 29 gün
Mesajlar
74
skillbar geldiği zaman w,a,s,d tuşlarını kullanamıyorum yardımcı olabilicek biri varmı.

Video:
 
Hangi kodu siliceğimi bilmediğim için reloadskillbardan onu soruyorum
 
Bir adet minigame yüklemişsin , bu minigame o kullanmış olduğun eklentinin içinden kaldırabilirsin. Eklenti kodlarının içinde dolaş biraz istersen veya bize kodu ilet bakalım
 
Kod:
local chance = 0
local skillGap = 20

function openGui(sentLength,taskID,namesent,chancesent,skillGapSent)
    guiEnabled = true
    SetNuiFocus(guiEnabled,false)
    print("taskbar started")
    SendNUIMessage({runProgress = true, Length = sentLength, Task = taskID, name = namesent, chance = chancesent, skillGap = skillGapSent})
end
function updateGui(sentLength,taskID,namesent,chancesent,skillGapSent)
    SendNUIMessage({runUpdate = true, Length = sentLength, Task = taskID, name = namesent, chance = chancesent, skillGap = skillGapSent})
end
local activeTasks = 0
function closeGuiFail()
    guiEnabled = false
    SetNuiFocus(guiEnabled,false)
    SendNUIMessage({closeFail = true})
end
function closeGui()
    guiEnabled = false
    SetNuiFocus(guiEnabled,false)
    SendNUIMessage({closeProgress = true})
end

function closeNormalGui()
    guiEnabled = false
    SetNuiFocus(guiEnabled,false)
end
 
RegisterNUICallback('taskCancel', function(data, cb)
  closeGui()
  activeTasks = 2
  FactorFunction(false)
end)

RegisterNUICallback('taskEnd', function(data, cb)
    closeNormalGui()
    if (tonumber(data.taskResult) < (chance + 20) and tonumber(data.taskResult) > (chance))  then
        activeTasks = 3
        --TriggerEvent("notification","Success!")
        factor = 1.0
    else
        FactorFunction(false)
        activeTasks = 2
    end
end)

local factor = 1.0
local taskInProcess = false
local calm = true

function FactorFunction(pos)
    if not pos then
        factor = factor - 0.1
        if factor < 0.1 then
            factor = 0.1
        end
        if factor == 0.5 and calm then
            calm = false
            TriggerEvent("notification","You are frustrated", 2)
        end
        TriggerEvent("factor:restore")       
    else
        if factor > 1.0 or factor == 0.9 then
            if not calm then
                TriggerEvent("notification","You are calm again")
                calm = true
            end           
            factor = 1.0
            return
        end
        factor = factor + 0.1
    end   
end

RegisterNetEvent('factor:restore')
AddEventHandler('factor:restore', function()
    Wait(15000)
    FactorFunction(true)
end)

-- difficulty around 1200 becomes hard on the 4-5th use
-- difficulty around 2500 should never really be a problem - just keeps them focused.

-- skillGap is the width of our current skill, 20 being easy, lower down to 5 is harder, almost impossible with higher speeds.

function taskBar(difficulty,skillGapSent)
    Wait(100)
    skillGap = skillGapSent
    if skillGap < 5 then
        skillGap = 5
    end
    local name = "E"
    local playerPed = PlayerPedId()
    if taskInProcess then
        return 100
    end
    FactorFunction(false)
    chance = math.random(15,90)

    local length = math.ceil(difficulty * factor)

    taskInProcess = true
    local taskIdentifier = "taskid" .. math.random(1000000)
    openGui(length,taskIdentifier,name,chance,skillGap)
    activeTasks = 1

    local maxcount = GetGameTimer() + length
    local curTime

    while activeTasks == 1 do
        Citizen.Wait(1)
        curTime = GetGameTimer()
        if curTime > maxcount then
            activeTasks = 2
        end
        local updater = 100 - (((maxcount - curTime) / length) * 100)
        updater = math.min(100, updater)
        updateGui(updater,taskIdentifier,name,chance,skillGap)
    end

    if activeTasks == 2 then
        closeGui()
        taskInProcess = false
        return 0
    else
        closeGui()
        taskInProcess = false
        return 100
    end
  
end


-- One Bar Test

RegisterCommand('testtaskbar', function()

    --local finished = exports["reload-skillbar"]:taskBar(4000,math.random(5,15))
    local finished = taskBar(4000,math.random(5,15))
    if finished ~= 100 then
        TriggerEvent('notification', 'You\'re trash at this...', 2)
        --TriggerEvent('notification', 'Failed', 2)
    else
        TriggerEvent('notification', 'Finished, now here\'s a cookie! xD')
        -- Do what you want them to do here...
        --HotWireCar()
    end
end)

-- REMEMBER EACH ONE GETS FASTER AUTOMATICALLY TOO!

-- Two Bar Test
RegisterCommand('testtaskbar2', function()

    --local finished = exports["reload-skillbar"]:taskBar(4000,math.random(5,15))
    local finished = taskBar(4000,math.random(5,15))
    if finished ~= 100 then
        TriggerEvent('notification', 'You\'re trash at this...', 2)
        --TriggerEvent('notification', 'Failed', 2)
    else
        --local finished2 = exports["reload-skillbar"]:taskBar(6000,math.random(5,15))
        local finished2 = taskBar(2500,math.random(5,15))
        if finished2 ~= 100 then
            TriggerEvent('notification', 'You\'re trash at this...', 2)
            --TriggerEvent('notification', 'Failed', 2)
        else
            TriggerEvent('notification', 'Finished, now here\'s a cookie! xD')
            -- Do what you want them to do here...
            --HotWireCar()
        end
    end
end)

-- Three Bar Test
RegisterCommand('testtaskbar3', function()

    --local finished = exports["reload-skillbar"]:taskBar(4000,math.random(5,15))
    local finished = taskBar(4000,math.random(5,15))
    if finished ~= 100 then
        TriggerEvent('notification', 'You\'re trash at this...', 2)
        --TriggerEvent('notification', 'Failed', 2)
    else
        --local finished2 = exports["reload-skillbar"]:taskBar(6000,math.random(5,15))
        local finished2 = taskBar(3000,math.random(5,15))
        if finished2 ~= 100 then
            TriggerEvent('notification', 'You\'re trash at this...', 2)
            --TriggerEvent('notification', 'Failed', 2)
        else
            --local finished3 = exports["reload-skillbar"]:taskBar(6000,math.random(5,15))
            local finished3 = taskBar(2000,math.random(5,15))
            if finished3 ~= 100 then
                TriggerEvent('notification', 'You\'re trash at this...', 2)
                --TriggerEvent('notification', 'Failed', 2)
            else
                TriggerEvent('notification', 'Finished, now here\'s a cookie! xD')
                -- Do what you want them to do here...
                --HotWireCar()
            end
        end
    end
end)
 

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!