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

Cevaplandı İtem kontrolü Ekleme

YasinTatar

Üye
FT Kullanıcı
Katılım
3 yıl 9 ay 5 gün
Mesajlar
229
Kod:
Hotwire = function()
    local plate = GetVehicleNumberPlateText(GetVehiclePedIsIn(PlayerPedId(), true))
    if not startedEngine[plate] and not hotwiredVeh[GetVehicleNumberPlateText(veh)] then
        local vehicle = GetVehiclePedIsIn(GetPlayerPed(-1), true)
        if vehicle ~= nil and vehicle ~= 0 then
            if GetPedInVehicleSeat(vehicle, -1) == GetPlayerPed(-1) then
                IsHotwiring = true

                local dict = "anim@amb@clubhouse@tutorial@bkr_tut_ig3@"
                local anim = "machinic_loop_mechandplayer"
                TaskPlayAnim(PlayerPedId(), 'anim@amb@clubhouse@tutorial@bkr_tut_ig3@', 'machinic_loop_mechandplayer' ,1.0, 4.0, -1, 49, 0, false, false, false)

                RequestAnimDict(dict)
                while not HasAnimDictLoaded(dict) do
                    RequestAnimDict(dict)
                    Citizen.Wait(100)
                end

                if exports["reload-skillbar"]:taskBar(math.random(4000,15000),math.random(10,20)) ~= 100 then             
                    StopAnimTask(GetPlayerPed(-1), "anim@amb@clubhouse@tutorial@bkr_tut_ig3@", "machinic_loop_mechandplayer", 1.0)
                    SetVehicleEngineOn(vehicle, false, false, true)
                    exports['swt_notifications']:Negative("Düz Kontak","Düz Kontak Başarısız","top-right",1500,true)
                    IsHotwiring = false

                    return
                end
    
                if exports["reload-skillbar"]:taskBar(math.random(4000,15000),math.random(10,20)) ~= 100 then
                    StopAnimTask(GetPlayerPed(-1), "anim@amb@clubhouse@tutorial@bkr_tut_ig3@", "machinic_loop_mechandplayer", 1.0)
                    SetVehicleEngineOn(vehicle, false, false, true)
                    exports['swt_notifications']:Negative("Düz Kontak","Düz Kontak Başarısız!","top-right",1500,true)
                    IsHotwiring = false
                    return
                end

                if exports["reload-skillbar"]:taskBar(1500,math.random(5,15)) ~= 100 then
                    StopAnimTask(GetPlayerPed(-1), "anim@amb@clubhouse@tutorial@bkr_tut_ig3@", "machinic_loop_mechandplayer", 1.0)
                    SetVehicleEngineOn(vehicle, false, false, true)
                    exports['swt_notifications']:Negative("Düz Kontak","Düz Kontak Başarısız","top-right",1500,true)
                    IsHotwiring = false
                    return
                end

                StopAnimTask(GetPlayerPed(-1), "anim@amb@clubhouse@tutorial@bkr_tut_ig3@", "machinic_loop_mechandplayer", 1.0)
                exports['swt_notifications']:Success("Düz Kontak","Düz Kontak Başarılı","top-right",1500,true)
                hotwiredVeh[plate] = true
                startedEngine[plate] = true
                IsHotwiring = false

            end
        end
    end
end

bu kod satırına nasıl item kontrolü ettirebilirim
 
Kod:
Hotwire = function()
    local plate = GetVehicleNumberPlateText(GetVehiclePedIsIn(PlayerPedId(), true))
    if not startedEngine[plate] and not hotwiredVeh[GetVehicleNumberPlateText(veh)] then
        local vehicle = GetVehiclePedIsIn(GetPlayerPed(-1), true)
        if vehicle ~= nil and vehicle ~= 0 then
            if GetPedInVehicleSeat(vehicle, -1) == GetPlayerPed(-1) then
                IsHotwiring = true

                local dict = "anim@amb@clubhouse@tutorial@bkr_tut_ig3@"
                local anim = "machinic_loop_mechandplayer"
                TaskPlayAnim(PlayerPedId(), 'anim@amb@clubhouse@tutorial@bkr_tut_ig3@', 'machinic_loop_mechandplayer' ,1.0, 4.0, -1, 49, 0, false, false, false)

                RequestAnimDict(dict)
                while not HasAnimDictLoaded(dict) do
                    RequestAnimDict(dict)
                    Citizen.Wait(100)
                end

                if exports["reload-skillbar"]:taskBar(math.random(4000,15000),math.random(10,20)) ~= 100 then            
                    StopAnimTask(GetPlayerPed(-1), "anim@amb@clubhouse@tutorial@bkr_tut_ig3@", "machinic_loop_mechandplayer", 1.0)
                    SetVehicleEngineOn(vehicle, false, false, true)
                    exports['swt_notifications']:Negative("Düz Kontak","Düz Kontak Başarısız","top-right",1500,true)
                    IsHotwiring = false

                    return
                end
   
                if exports["reload-skillbar"]:taskBar(math.random(4000,15000),math.random(10,20)) ~= 100 then
                    StopAnimTask(GetPlayerPed(-1), "anim@amb@clubhouse@tutorial@bkr_tut_ig3@", "machinic_loop_mechandplayer", 1.0)
                    SetVehicleEngineOn(vehicle, false, false, true)
                    exports['swt_notifications']:Negative("Düz Kontak","Düz Kontak Başarısız!","top-right",1500,true)
                    IsHotwiring = false
                    return
                end

                if exports["reload-skillbar"]:taskBar(1500,math.random(5,15)) ~= 100 then
                    StopAnimTask(GetPlayerPed(-1), "anim@amb@clubhouse@tutorial@bkr_tut_ig3@", "machinic_loop_mechandplayer", 1.0)
                    SetVehicleEngineOn(vehicle, false, false, true)
                    exports['swt_notifications']:Negative("Düz Kontak","Düz Kontak Başarısız","top-right",1500,true)
                    IsHotwiring = false
                    return
                end

                StopAnimTask(GetPlayerPed(-1), "anim@amb@clubhouse@tutorial@bkr_tut_ig3@", "machinic_loop_mechandplayer", 1.0)
                exports['swt_notifications']:Success("Düz Kontak","Düz Kontak Başarılı","top-right",1500,true)
                hotwiredVeh[plate] = true
                startedEngine[plate] = true
                IsHotwiring = false

            end
        end
    end
end

bu kod satırına nasıl item kontrolü ettirebilirim

Buyur, hem de GetPlayerPed(-1) leri düzelttim:

Kod:
Hotwire = function()
    local plate = GetVehicleNumberPlateText(GetVehiclePedIsIn(PlayerPedId(), true))
    if not startedEngine[plate] and not hotwiredVeh[GetVehicleNumberPlateText(veh)] then
        local vehicle = GetVehiclePedIsIn(PlayerPedId(), true)
        if vehicle ~= nil and vehicle ~= 0 then
            if GetPedInVehicleSeat(vehicle, -1) == PlayerPedId() then
                local xPlayer = ESX.GetPlayerFromId(source)  -- oyuncuyu veriye atiyoruz
                local yankeski = xPlayer.getInventoryItem("yankeski").count  -- envanterde kac adet yankeski itemi var diye bakiyoruz
                if yankeski ~= nil and yankeski ~= 0 then  -- envanterimizde yankeski var ise ve adedi 0 dan yüksek ise duzkontak yapmaya baslar
                    IsHotwiring = true

                    local dict = "anim@amb@clubhouse@tutorial@bkr_tut_ig3@"
                    local anim = "machinic_loop_mechandplayer"
                    TaskPlayAnim(PlayerPedId(), 'anim@amb@clubhouse@tutorial@bkr_tut_ig3@', 'machinic_loop_mechandplayer' ,1.0, 4.0, -1, 49, 0, false, false, false)

                    RequestAnimDict(dict)
                    while not HasAnimDictLoaded(dict) do
                        RequestAnimDict(dict)
                        Citizen.Wait(100)
                    end

                    if exports["reload-skillbar"]:taskBar(math.random(4000,15000),math.random(10,20)) ~= 100 then             
                        StopAnimTask(PlayerPedId(), "anim@amb@clubhouse@tutorial@bkr_tut_ig3@", "machinic_loop_mechandplayer", 1.0)
                        SetVehicleEngineOn(vehicle, false, false, true)
                        exports['swt_notifications']:Negative("Düz Kontak","Düz Kontak Başarısız","top-right",1500,true)
                        IsHotwiring = false

                        return
                    end
        
                    if exports["reload-skillbar"]:taskBar(math.random(4000,15000),math.random(10,20)) ~= 100 then
                        StopAnimTask(PlayerPedId(), "anim@amb@clubhouse@tutorial@bkr_tut_ig3@", "machinic_loop_mechandplayer", 1.0)
                        SetVehicleEngineOn(vehicle, false, false, true)
                        exports['swt_notifications']:Negative("Düz Kontak","Düz Kontak Başarısız!","top-right",1500,true)
                        IsHotwiring = false
                        return
                    end

                    if exports["reload-skillbar"]:taskBar(1500,math.random(5,15)) ~= 100 then
                        StopAnimTask(PlayerPedId(), "anim@amb@clubhouse@tutorial@bkr_tut_ig3@", "machinic_loop_mechandplayer", 1.0)
                        SetVehicleEngineOn(vehicle, false, false, true)
                        exports['swt_notifications']:Negative("Düz Kontak","Düz Kontak Başarısız","top-right",1500,true)
                        IsHotwiring = false
                        return
                    end

                    StopAnimTask(PlayerPedId(), "anim@amb@clubhouse@tutorial@bkr_tut_ig3@", "machinic_loop_mechandplayer", 1.0)
                    exports['swt_notifications']:Success("Düz Kontak","Düz Kontak Başarılı","top-right",1500,true)
                    hotwiredVeh[plate] = true
                    startedEngine[plate] = true
                    IsHotwiring = false
                else  -- eger üzerinde yankeski yok ise bildirim verir
                    exports['swt_notifications']:Negative("Düz Kontak","Üzerinizde kablolari kesmek için yankeski olmasi gerek!","top-right",1500,true)
                end
            end
        end
    end
end
 
62798

Hata Veriyor kral
 
Kod:
Citizen.CreateThread(function()
  while ESX == nil do
    TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
    Citizen.Wait(31)
  end
end)
Bu şekilde kod satırı var
 
Kod:
Citizen.CreateThread(function()
  while ESX == nil do
    TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
    Citizen.Wait(31)
  end
end)
Bu şekilde kod satırı var

mbl-carkeys/cl.lua:104 ün ss ini atarmisin ?
 
local xPlayer = ESX.GetPlayerFromId(source) -- oyuncuyu veriye atiyoruz


bu işte senin eklediğin satır
 
Merhaba,

Verilen cevaplar doğrultusunda sorunuz çözüme kavuştu mu?
 
Konu sahibi cevap vermediği için konu eki tarafımca değiştirilmiştir.
 

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!