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 Silahı al koy yapınca susturucu gidiyor

imn0thing

Üye
FT Kullanıcı
Katılım
3 yıl 3 ay 26 gün
Mesajlar
688
Selam. Silahımı al koy yapıyorum ve susturucu elimden gidiyor. Bunu nasıl engelleyebilirim ? aklımda mysql vardı fakat nasıl yapacağımı bilmediğim için sormak istedim.
Dipnot : herşeyi çalışıyor m3 envantere de entegre ettim. Bu arada bilerek envanterden silinmesini kapattım çünkü çok mantıksızdı

Eklenti : cyber-accessories

Server :
Kod:
ESX = nil

TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)

ESX.RegisterUsableItem('susturucu', function(source)  
    TriggerClientEvent('ExeLds:susturucu', source)
end)

ESX.RegisterUsableItem('fener', function(source)
    TriggerClientEvent('ExeLds:fener', source)
end)

ESX.RegisterUsableItem('tutamac', function(source)
    TriggerClientEvent('ExeLds:tutamac', source)
end)

ESX.RegisterUsableItem('kaplama', function(source)
    TriggerClientEvent('ExeLds:kaplama', source)
end)

ESX.RegisterUsableItem('durbun', function(source)
    TriggerClientEvent('ExeLds:durbun', source)
end)

ESX.RegisterUsableItem('uzatilmis', function(source)
    TriggerClientEvent('ExeLds:uzatilmis', source)
end)

RegisterNetEvent('ExeLds:eklentiCikart')
AddEventHandler('ExeLds:eklentiCikart', function(hash)
    local player = ESX.GetPlayerFromId(source)
    MySQL.Async.execute('UPDATE disc_ammo SET susturucu = @susturucu, fener = @fener, tutamac = @tutamac, kaplama = @kaplama, durbun = @durbun WHERE hash = @hash AND owner = @owner', {
        ['@owner'] = player.identifier,
        ['@hash'] = hash,
        ['@susturucu'] = 0,
        ['@fener'] = 0,
        ['@tutamac'] = 0,
        ['@kaplama'] = 0,
        ['@durbun'] = 0
    }, function(results)
    end)
    TriggerClientEvent('mythic_notify:client:SendAlert', source, { type = 'inform', text = 'Tüm eklentiler çıkartıldı.', length = 3000, style = { ['background-color'] = '#00CC00', ['color'] = '#000000' } })
end)

RegisterNetEvent('ExeLds:susturucuTak')
AddEventHandler('ExeLds:susturucuTak', function(hash)
    local player = ESX.GetPlayerFromId(source)
    --player.removeInventoryItem('susturucu', 1)
    MySQL.Async.execute('UPDATE disc_ammo SET susturucu = @susturucu WHERE hash = @hash AND owner = @owner', {
        ['@owner'] = player.identifier,
        ['@hash'] = hash,
        ['@susturucu'] = 1
    }, function(results)
        if results == 0 then
            MySQL.Async.execute('INSERT INTO disc_ammo (owner, hash, susturucu) VALUES (@owner, @hash, @susturucu)', {
                ['@owner'] = player.identifier,
                ['@hash'] = hash,
                ['@susturucu'] = 1
            })
        end
    end)
end)

RegisterNetEvent('ExeLds:fenerTak')
AddEventHandler('ExeLds:fenerTak', function(hash)
    local player = ESX.GetPlayerFromId(source)
    --player.removeInventoryItem('fener', 1)
    MySQL.Async.execute('UPDATE disc_ammo SET fener = @fener WHERE hash = @hash AND owner = @owner', {
        ['@owner'] = player.identifier,
        ['@hash'] = hash,
        ['@fener'] = 1
    }, function(results)
        if results == 0 then
            MySQL.Async.execute('INSERT INTO disc_ammo (owner, hash, fener) VALUES (@owner, @hash, @fener)', {
                ['@owner'] = player.identifier,
                ['@hash'] = hash,
                ['@fener'] = 1
            })
        end
    end)
end)

RegisterNetEvent('ExeLds:tutamacTak')
AddEventHandler('ExeLds:tutamacTak', function(hash)
    local player = ESX.GetPlayerFromId(source)
    --player.removeInventoryItem('tutamac', 1)
    MySQL.Async.execute('UPDATE disc_ammo SET tutamac = @tutamac WHERE hash = @hash AND owner = @owner', {
        ['@owner'] = player.identifier,
        ['@hash'] = hash,
        ['@tutamac'] = 1
    }, function(results)
        if results == 0 then
            MySQL.Async.execute('INSERT INTO disc_ammo (owner, hash, tutamac) VALUES (@owner, @hash, @tutamac)', {
                ['@owner'] = player.identifier,
                ['@hash'] = hash,
                ['@tutamac'] = 1
            })
        end
    end)
end)

RegisterNetEvent('ExeLds:kaplamaTak')
AddEventHandler('ExeLds:kaplamaTak', function(hash)
    local player = ESX.GetPlayerFromId(source)
    --player.removeInventoryItem('kaplama', 1)
    MySQL.Async.execute('UPDATE disc_ammo SET kaplama = @kaplama WHERE hash = @hash AND owner = @owner', {
        ['@owner'] = player.identifier,
        ['@hash'] = hash,
        ['@kaplama'] = 1
    }, function(results)
        if results == 0 then
            MySQL.Async.execute('INSERT INTO disc_ammo (owner, hash, kaplama) VALUES (@owner, @hash, @kaplama)', {
                ['@owner'] = player.identifier,
                ['@hash'] = hash,
                ['@kaplama'] = 1
            })
        end
    end)
end)

RegisterNetEvent('ExeLds:durbunTak')
AddEventHandler('ExeLds:durbunTak', function(hash)
    local player = ESX.GetPlayerFromId(source)
    --player.removeInventoryItem('durbun', 1)
    MySQL.Async.execute('UPDATE disc_ammo SET durbun = @durbun WHERE hash = @hash AND owner = @owner', {
        ['@owner'] = player.identifier,
        ['@hash'] = hash,
        ['@durbun'] = 1
    }, function(results)
        if results == 0 then
            MySQL.Async.execute('INSERT INTO disc_ammo (owner, hash, durbun) VALUES (@owner, @hash, @durbun)', {
                ['@owner'] = player.identifier,
                ['@hash'] = hash,
                ['@durbun'] = 1
            })
        end
    end)
end)

RegisterNetEvent('ExeLds:uzatilmisTak')
AddEventHandler('ExeLds:uzatilmisTak', function(hash)
    local player = ESX.GetPlayerFromId(source)
    --player.removeInventoryItem('uzatilmis', 1)
    MySQL.Async.execute('UPDATE disc_ammo SET uzatilmis = @uzatilmis WHERE hash = @hash AND owner = @owner', {
        ['@owner'] = player.identifier,
        ['@hash'] = hash,
        ['@uzatilmis'] = 1
    }, function(results)
        if results == 0 then
            MySQL.Async.execute('INSERT INTO disc_ammo (owner, hash, uzatilmis) VALUES (@owner, @hash, @uzatilmis)', {
                ['@owner'] = player.identifier,
                ['@hash'] = hash,
                ['@uzatilmis'] = 1
            })
        end
    end)
end)
Client :
Kod:
supp1 = {-2084633992, -1357824103, 2132975508, -494615257}
supp2 = {-1716589765, 324215364, -270015777, -1074790547, -1063057011, -1654528753, 984333226}
supp3 = {1593441988, -771403250, 584646201, 137902532, 736523883}
supp4 = {487013001}

flash1 = {453432689, 1593441988, 584646201, -1716589765, -771403250, 324215364}
flash2 = {736523883, -270015777, 171789620, -1074790547, -2084633992, -1357824103, -1063057011, 2132975508, 487013001, -494615257, -1654528753, 984333226}

grip1 = {171789620, -1074790547, -2084633992, -1063057011, 2132975508, 2144741730, -494615257, -1654528753, 984333226}

scope1 = {-2084633992}

ESX = nil

Citizen.CreateThread(function()
    while ESX == nil do
        TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
        Citizen.Wait(0)
    end
end)


RegisterNetEvent('esx:playerLoaded')
AddEventHandler('esx:playerLoaded', function(xPlayer)
    PlayerData = xPlayer
end)


RegisterCommand("eklenticikart", function()
local ped = PlayerPedId()
local SilahHash = GetSelectedPedWeapon(ped)
local oyuncu = PlayerPedId()
TriggerServerEvent('ExeLds:eklentiCikart', SilahHash)
TriggerEvent('m3:inventoryhud:client:removeCurrentWeapon')
end)

RegisterNetEvent('ExeLds:susturucu')
AddEventHandler('ExeLds:susturucu', function()

    local ped = PlayerPedId()
    local SilahHash = GetSelectedPedWeapon(ped)
   
    ESX.TriggerServerCallback('m3:inventoryhud:server:getAmmoCount', function(ammoCount, susturucu, fener, tutamac, kaplama, durbun)
    if susturucu ~= 1 then
    if SilahHash == GetHashKey("WEAPON_PISTOL") then
        GiveWeaponComponentToPed(PlayerPedId(), GetHashKey("WEAPON_PISTOL"), GetHashKey("component_at_pi_supp_02"))
        exports['mythic_notify']:SendAlert('inform', 'Susturucu takıldı!', 3000, { ['background-color'] = '#336600', ['color'] = '#FFFFFF' })
        TriggerServerEvent('ExeLds:susturucuTak', SilahHash)
    elseif table.includes(supp1, SilahHash) then
        GiveWeaponComponentToPed(PlayerPedId(), SilahHash, 0x837445AA)
        exports['mythic_notify']:SendAlert('inform', 'Susturucu takıldı!', 3000, { ['background-color'] = '#336600', ['color'] = '#FFFFFF' })
        TriggerServerEvent('ExeLds:susturucuTak', SilahHash)
    elseif table.includes(supp2, SilahHash) then
        GiveWeaponComponentToPed(PlayerPedId(), SilahHash, 0xA73D4664)
        exports['mythic_notify']:SendAlert('inform', 'Susturucu takıldı!', 3000, { ['background-color'] = '#336600', ['color'] = '#FFFFFF' })
        TriggerServerEvent('ExeLds:susturucuTak', SilahHash)
    elseif table.includes(supp3, SilahHash) then
        GiveWeaponComponentToPed(PlayerPedId(), SilahHash, 0xC304849A)
        exports['mythic_notify']:SendAlert('inform', 'Susturucu takıldı!', 3000, { ['background-color'] = '#336600', ['color'] = '#FFFFFF' })
        TriggerServerEvent('ExeLds:susturucuTak', SilahHash)
    elseif table.includes(supp4, SilahHash) then
        GiveWeaponComponentToPed(PlayerPedId(), SilahHash, 0xE608B35E)
        exports['mythic_notify']:SendAlert('inform', 'Susturucu takıldı!', 3000, { ['background-color'] = '#336600', ['color'] = '#FFFFFF' })
        TriggerServerEvent('ExeLds:susturucuTak', SilahHash)
    else
        exports['mythic_notify']:SendAlert('inform', 'Bu silah susturucu takmak için uygun değil!', 6000, { ['background-color'] = '#CC0000', ['color'] = '#FFFFFF' })
    end
    else  
        exports['mythic_notify']:SendAlert('inform', 'Silahında zaten susturucu bulunuyor!', 6000, { ['background-color'] = '#CC0000', ['color'] = '#FFFFFF' })
    end
    end, SilahHash)
end)


RegisterNetEvent('ExeLds:fener')
AddEventHandler('ExeLds:fener', function()
    local ped = PlayerPedId()
    local SilahHash = GetSelectedPedWeapon(ped)
    ESX.TriggerServerCallback('m3:inventoryhud:server:getAmmoCount', function(ammoCount, susturucu, fener, tutamac, kaplama, durbun)
    if fener ~= 1 then
    if table.includes(flash1, SilahHash) then
        GiveWeaponComponentToPed(PlayerPedId(), SilahHash, 0x359B7AAE)
        exports['mythic_notify']:SendAlert('inform', 'Fener takıldı!', 3000, { ['background-color'] = '#336600', ['color'] = '#FFFFFF' })
        TriggerServerEvent('ExeLds:fenerTak', SilahHash)
    elseif table.includes(flash2, SilahHash) then
        GiveWeaponComponentToPed(PlayerPedId(), SilahHash, 0x7BC4CDDC)
        exports['mythic_notify']:SendAlert('inform', 'Fener takıldı!', 3000, { ['background-color'] = '#336600', ['color'] = '#FFFFFF' })
        TriggerServerEvent('ExeLds:fenerTak', SilahHash)
    else
        exports['mythic_notify']:SendAlert('inform', 'Bu silah fener takmak için uygun değil!', 6000, { ['background-color'] = '#CC0000', ['color'] = '#FFFFFF' })
    end
    else  
        exports['mythic_notify']:SendAlert('inform', 'Silahında zaten fener bulunuyor!', 6000, { ['background-color'] = '#CC0000', ['color'] = '#FFFFFF' })
    end
    end, SilahHash)
end)


RegisterNetEvent('ExeLds:tutamac')
AddEventHandler('ExeLds:tutamac', function()
    local ped = PlayerPedId()
    local SilahHash = GetSelectedPedWeapon(ped)
   
    ESX.TriggerServerCallback('m3:inventoryhud:server:getAmmoCount', function(ammoCount, susturucu, fener, tutamac, kaplama, durbun)
    if tutamac ~= 1 then
    if table.includes(grip1, SilahHash) then
        GiveWeaponComponentToPed(PlayerPedId(), SilahHash, 0xC164F53)
        exports['mythic_notify']:SendAlert('inform', 'Tutamaç takıldı!', 3000, { ['background-color'] = '#336600', ['color'] = '#FFFFFF' })
        TriggerServerEvent('ExeLds:tutamacTak', SilahHash)
    else
        exports['mythic_notify']:SendAlert('inform', 'Bu silah tutamaç takmak için uygun değil!', 6000, { ['background-color'] = '#CC0000', ['color'] = '#FFFFFF' })
    end  
    else  
        exports['mythic_notify']:SendAlert('inform', 'Silahında zaten tutamaç bulunuyor!', 6000, { ['background-color'] = '#CC0000', ['color'] = '#FFFFFF' })
    end
    end, SilahHash)
end)

RegisterNetEvent('ExeLds:kaplama')
AddEventHandler('ExeLds:kaplama', function()
    local ped = PlayerPedId()
    local mevcutSilahHash = GetSelectedPedWeapon(ped)
    ESX.TriggerServerCallback('m3:inventoryhud:server:getAmmoCount', function(ammoCount, susturucu, fener, tutamac, kaplama, durbun)
    if kaplama ~= 1 then
        if mevcutSilahHash == GetHashKey("WEAPON_PISTOL") then
            GiveWeaponComponentToPed(PlayerPedId(), GetHashKey("WEAPON_PISTOL"), GetHashKey("COMPONENT_PISTOL_VARMOD_LUXE"))
            exports['mythic_notify']:SendAlert('inform', 'Kaplama yapıldı!', 3000, { ['background-color'] = '#336600', ['color'] = '#FFFFFF' })
            TriggerServerEvent('ExeLds:kaplamaTak', mevcutSilahHash)
       
        elseif mevcutSilahHash == GetHashKey("WEAPON_PISTOL50") then
            GiveWeaponComponentToPed(PlayerPedId(), GetHashKey("WEAPON_PISTOL50"), GetHashKey("COMPONENT_PISTOL50_VARMOD_LUXE"))
            exports['mythic_notify']:SendAlert('inform', 'Kaplama yapıldı!', 3000, { ['background-color'] = '#336600', ['color'] = '#FFFFFF' })
            TriggerServerEvent('ExeLds:kaplamaTak', mevcutSilahHash)

        elseif mevcutSilahHash == GetHashKey("WEAPON_APPISTOL") then
            GiveWeaponComponentToPed(PlayerPedId(), GetHashKey("WEAPON_APPISTOL"), GetHashKey("COMPONENT_APPISTOL_VARMOD_LUXE"))
            exports['mythic_notify']:SendAlert('inform', 'Kaplama yapıldı!', 3000, { ['background-color'] = '#336600', ['color'] = '#FFFFFF' })
            TriggerServerEvent('ExeLds:kaplamaTak', mevcutSilahHash)

        elseif mevcutSilahHash == GetHashKey("WEAPON_HEAVYPISTOL") then
            GiveWeaponComponentToPed(PlayerPedId(), GetHashKey("WEAPON_HEAVYPISTOL"), GetHashKey("COMPONENT_HEAVYPISTOL_VARMOD_LUXE"))
            exports['mythic_notify']:SendAlert('inform', 'Kaplama yapıldı!', 3000, { ['background-color'] = '#336600', ['color'] = '#FFFFFF' })
            TriggerServerEvent('ExeLds:kaplamaTak', mevcutSilahHash)

        elseif mevcutSilahHash == GetHashKey("WEAPON_SMG") then
            GiveWeaponComponentToPed(PlayerPedId(), GetHashKey("WEAPON_SMG"), GetHashKey("COMPONENT_SMG_VARMOD_LUXE"))
            exports['mythic_notify']:SendAlert('inform', 'Kaplama yapıldı!', 3000, { ['background-color'] = '#336600', ['color'] = '#FFFFFF' })
            TriggerServerEvent('ExeLds:kaplamaTak', mevcutSilahHash)

        elseif mevcutSilahHash == GetHashKey("WEAPON_MICROSMG") then
            GiveWeaponComponentToPed(PlayerPedId(), GetHashKey("WEAPON_MICROSMG"), GetHashKey("COMPONENT_MICROSMG_VARMOD_LUXE"))
            exports['mythic_notify']:SendAlert('inform', 'Kaplama yapıldı!', 3000, { ['background-color'] = '#336600', ['color'] = '#FFFFFF' })
            TriggerServerEvent('ExeLds:kaplamaTak', mevcutSilahHash)

        elseif mevcutSilahHash == GetHashKey("WEAPON_ASSAULTRIFLE") then
            GiveWeaponComponentToPed(PlayerPedId(), GetHashKey("WEAPON_ASSAULTRIFLE"), GetHashKey("COMPONENT_ASSAULTRIFLE_VARMOD_LUXE"))
            exports['mythic_notify']:SendAlert('inform', 'Kaplama yapıldı!', 3000, { ['background-color'] = '#336600', ['color'] = '#FFFFFF' })
            TriggerServerEvent('ExeLds:kaplamaTak', mevcutSilahHash)

        elseif mevcutSilahHash == GetHashKey("WEAPON_CARBINERIFLE") then
            GiveWeaponComponentToPed(PlayerPedId(), GetHashKey("WEAPON_CARBINERIFLE"), GetHashKey("COMPONENT_CARBINERIFLE_VARMOD_LUXE"))
            exports['mythic_notify']:SendAlert('inform', 'Kaplama yapıldı!', 3000, { ['background-color'] = '#336600', ['color'] = '#FFFFFF' })
            TriggerServerEvent('ExeLds:kaplamaTak', mevcutSilahHash)

        elseif mevcutSilahHash == GetHashKey("WEAPON_ADVANCEDRIFLE") then
            GiveWeaponComponentToPed(PlayerPedId(), GetHashKey("WEAPON_ADVANCEDRIFLE"), GetHashKey("COMPONENT_ADVANCEDRIFLE_VARMOD_LUXE"))
            exports['mythic_notify']:SendAlert('inform', 'Kaplama yapıldı!', 3000, { ['background-color'] = '#336600', ['color'] = '#FFFFFF' })
            TriggerServerEvent('ExeLds:kaplamaTak', mevcutSilahHash)
        else
            exports['mythic_notify']:SendAlert('inform', 'Bu silah kaplama yapmak için uygun değil!', 6000, { ['background-color'] = '#CC0000', ['color'] = '#FFFFFF' })
        end
    else  
            exports['mythic_notify']:SendAlert('inform', 'Silahında zaten kaplama bulunuyor!', 6000, { ['background-color'] = '#CC0000', ['color'] = '#FFFFFF' })
    end  
    end, mevcutSilahHash)
end)

RegisterNetEvent('ExeLds:durbun')
AddEventHandler('ExeLds:durbun', function()
    local ped = PlayerPedId()
    local SilahHash = GetSelectedPedWeapon(ped)
   
    ESX.TriggerServerCallback('m3:inventoryhud:server:getAmmoCount', function(ammoCount, susturucu, fener, tutamac, kaplama, durbun)
    if durbun ~= 1 then
    if table.includes(scope1, SilahHash) then
        GiveWeaponComponentToPed(PlayerPedId(), SilahHash, 0xA0D89C42)
        exports['mythic_notify']:SendAlert('inform', 'Dürbün takıldı!', 3000, { ['background-color'] = '#336600', ['color'] = '#FFFFFF' })
        TriggerServerEvent('ExeLds:durbunTak', SilahHash)
    else
        exports['mythic_notify']:SendAlert('inform', 'Bu silah dürbün takmak için uygun değil!', 6000, { ['background-color'] = '#CC0000', ['color'] = '#FFFFFF' })
    end  
    else  
        exports['mythic_notify']:SendAlert('inform', 'Silahında zaten dürbün bulunuyor!', 6000, { ['background-color'] = '#CC0000', ['color'] = '#FFFFFF' })
    end
    end, SilahHash)
end)

RegisterNetEvent('ExeLds:uzatilmis')
AddEventHandler('ExeLds:uzatilmis', function()
    local ped = PlayerPedId()
    local mevcutSilahHash = GetSelectedPedWeapon(ped)
    ESX.TriggerServerCallback('m3:inventoryhud:server:getAmmoCount', function(ammoCount, susturucu, fener, tutamac, kaplama, durbun, uzatilmis)
    if uzatilmis ~= 1 then
        if mevcutSilahHash == GetHashKey("WEAPON_PISTOL") then
            GiveWeaponComponentToPed(PlayerPedId(), GetHashKey("WEAPON_PISTOL"), GetHashKey("COMPONENT_PISTOL_CLIP_02"))
            exports['mythic_notify']:SendAlert('inform', 'Uzatılmış takıldı!', 3000, { ['background-color'] = '#336600', ['color'] = '#FFFFFF' })
            TriggerServerEvent('ExeLds:uzatilmisTak', mevcutSilahHash)
       
        elseif mevcutSilahHash == GetHashKey("WEAPON_PISTOL50") then
            GiveWeaponComponentToPed(PlayerPedId(), GetHashKey("WEAPON_PISTOL50"), GetHashKey("COMPONENT_PISTOL50_CLIP_02"))
            exports['mythic_notify']:SendAlert('inform', 'Uzatılmış takıldı!', 3000, { ['background-color'] = '#336600', ['color'] = '#FFFFFF' })
            TriggerServerEvent('ExeLds:uzatilmisTak', mevcutSilahHash)

        elseif mevcutSilahHash == GetHashKey("WEAPON_APPISTOL") then
            GiveWeaponComponentToPed(PlayerPedId(), GetHashKey("WEAPON_APPISTOL"), GetHashKey("COMPONENT_APPISTOL_CLIP_02"))
            exports['mythic_notify']:SendAlert('inform', 'Uzatılmış takıldı!', 3000, { ['background-color'] = '#336600', ['color'] = '#FFFFFF' })
            TriggerServerEvent('ExeLds:uzatilmisTak', mevcutSilahHash)

        elseif mevcutSilahHash == GetHashKey("WEAPON_HEAVYPISTOL") then
            GiveWeaponComponentToPed(PlayerPedId(), GetHashKey("WEAPON_HEAVYPISTOL"), GetHashKey("COMPONENT_HEAVYPISTOL_CLIP_02"))
            exports['mythic_notify']:SendAlert('inform', 'Uzatılmış takıldı!', 3000, { ['background-color'] = '#336600', ['color'] = '#FFFFFF' })
            TriggerServerEvent('ExeLds:uzatilmisTak', mevcutSilahHash)

        elseif mevcutSilahHash == GetHashKey("WEAPON_SMG") then
            GiveWeaponComponentToPed(PlayerPedId(), GetHashKey("WEAPON_SMG"), GetHashKey("COMPONENT_SMG_CLIP_02"))
            exports['mythic_notify']:SendAlert('inform', 'Uzatılmış takıldı!', 3000, { ['background-color'] = '#336600', ['color'] = '#FFFFFF' })
            TriggerServerEvent('ExeLds:uzatilmisTak', mevcutSilahHash)

        elseif mevcutSilahHash == GetHashKey("WEAPON_MICROSMG") then
            GiveWeaponComponentToPed(PlayerPedId(), GetHashKey("WEAPON_MICROSMG"), GetHashKey("COMPONENT_MICROSMG_CLIP_02"))
            exports['mythic_notify']:SendAlert('inform', 'Uzatılmış takıldı!', 3000, { ['background-color'] = '#336600', ['color'] = '#FFFFFF' })
            TriggerServerEvent('ExeLds:uzatilmisTak', mevcutSilahHash)

        elseif mevcutSilahHash == GetHashKey("WEAPON_ASSAULTRIFLE") then
            GiveWeaponComponentToPed(PlayerPedId(), GetHashKey("WEAPON_ASSAULTRIFLE"), GetHashKey("COMPONENT_ASSAULTRIFLE_CLIP_02"))
            exports['mythic_notify']:SendAlert('inform', 'Uzatılmış takıldı!', 3000, { ['background-color'] = '#336600', ['color'] = '#FFFFFF' })
            TriggerServerEvent('ExeLds:uzatilmisTak', mevcutSilahHash)

        elseif mevcutSilahHash == GetHashKey("WEAPON_CARBINERIFLE") then
            GiveWeaponComponentToPed(PlayerPedId(), GetHashKey("WEAPON_CARBINERIFLE"), GetHashKey("COMPONENT_CARBINERIFLE_CLIP_02"))
            exports['mythic_notify']:SendAlert('inform', 'Uzatılmış takıldı!', 3000, { ['background-color'] = '#336600', ['color'] = '#FFFFFF' })
            TriggerServerEvent('ExeLds:uzatilmisTak', mevcutSilahHash)

        elseif mevcutSilahHash == GetHashKey("WEAPON_ADVANCEDRIFLE") then
            GiveWeaponComponentToPed(PlayerPedId(), GetHashKey("WEAPON_ADVANCEDRIFLE"), GetHashKey("COMPONENT_ADVANCEDRIFLE_CLIP_02"))
            exports['mythic_notify']:SendAlert('inform', 'Uzatılmış takıldı!', 3000, { ['background-color'] = '#336600', ['color'] = '#FFFFFF' })
            TriggerServerEvent('ExeLds:uzatilmisTak', mevcutSilahHash)
        else
            exports['mythic_notify']:SendAlert('inform', 'Bu silah uzatılmış takmak için uygun değil!', 6000, { ['background-color'] = '#CC0000', ['color'] = '#FFFFFF' })
        end
    else  
            exports['mythic_notify']:SendAlert('inform', 'Silahında zaten uzatılmış takılı!', 6000, { ['background-color'] = '#CC0000', ['color'] = '#FFFFFF' })
    end  
    end, mevcutSilahHash)
end)


function table.includes(table, element)
    for _, value in pairs(table) do
        if value == element then
            return true
        end
    end
    return false
end
 
Moderatör tarafında düzenlendi:
Merhaba,

Eklentiyi taktığınızda disc-ammo tablosunda susturucuyu algılamıyor ve itemi kaydetmiyor. Aşağıdaki attıklarımı yaparsanız sorununuz çözülecektir.


Kod:
  `susturucu` int(11) NOT NULL DEFAULT 0,
  `fener` int(11) NOT NULL DEFAULT 0,
  `tutamac` int(11) NOT NULL DEFAULT 0,
  `kaplama` int(11) NOT NULL DEFAULT 0,
  `durbun` int(11) NOT NULL DEFAULT 0,
  `uzatilmis` int(11) NOT NULL DEFAULT 0

44832
44833


 
Merhaba,

Eklentiyi taktığınızda disc-ammo tablosunda susturucuyu algılamıyor ve itemi kaydetmiyor. Aşağıdaki attıklarımı yaparsanız sorununuz çözülecektir.


Kod:
  `susturucu` int(11) NOT NULL DEFAULT 0,
  `fener` int(11) NOT NULL DEFAULT 0,
  `tutamac` int(11) NOT NULL DEFAULT 0,
  `kaplama` int(11) NOT NULL DEFAULT 0,
  `durbun` int(11) NOT NULL DEFAULT 0,
  `uzatilmis` int(11) NOT NULL DEFAULT 0
zaten vardı hocam uzatilmis tutamac falan
 
+1 hala düzeltemedim. daha iyi bir aksesuar scripti olan atabilir mi ? envanter galiba aksesuarları çekmiyor ayrıca üzerimde item olmasa bile aksesuar kullanabiliyorum if else yapınca bozuluyor. dediğim gibi daha iyi scripti olan atarsa teşekkür ederim şimdiden.
 
var mı yapabilen ?
 

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!