hasankortak
üye
- Katılım
- 23 Tem 2021
- Mesajlar
- 430
- Konu Yazar
- #1
DOWLAND
VİRÜSTOTAL
Gerekli olan indirmeleri yapınız disc_ammo sql'ini değiştirmeyi unutmayınız! ardından aşağıda verilen düzenlemeleri yaparak kullanabilirsiniz.
İtems kısmına eklencek itemler : susturucu, fener, tutamac, kaplama, durbun, uzatilmis
/eklenticikart yazarak eklentileri çıkartır.
m3_inventoryhud/client.lua girip function GiveWeapon(weapon) bulup aşağıdaki satırla değiştirin
Kod:
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}
function GiveWeapon(weapon)
local checkh = Config.ItemWeapons.Throwables
local playerPed = PlayerPedId()
local hash = GetHashKey(weapon)
ESX.TriggerServerCallback('m3:inventoryhud:server:getAmmoCount', function(ammoCount, susturucu, fener, tutamac, kaplama, durbun, uzatilmis)
GiveWeaponToPed(playerPed, hash, 1, false, true)
if susturucu == 1 then
if hash == GetHashKey("WEAPON_PISTOL") then
GiveWeaponComponentToPed(PlayerPedId(), GetHashKey("WEAPON_PISTOL"), GetHashKey("component_at_pi_supp_02"))
elseif table.includes(supp1, hash) then
GiveWeaponComponentToPed(PlayerPedId(), hash, 0x837445AA)
elseif table.includes(supp2, hash) then
GiveWeaponComponentToPed(PlayerPedId(), hash, 0xA73D4664)
elseif table.includes(supp3, hash) then
GiveWeaponComponentToPed(PlayerPedId(), hash, 0xC304849A)
elseif table.includes(supp4, hash) then
GiveWeaponComponentToPed(PlayerPedId(), hash, 0xE608B35E)
end
end
if uzatilmis == 1 then
if hash == GetHashKey("WEAPON_PISTOL") then
GiveWeaponComponentToPed(PlayerPedId(), GetHashKey("WEAPON_PISTOL"), GetHashKey("COMPONENT_PISTOL_CLIP_02"))
elseif hash == GetHashKey("WEAPON_PISTOL50") then
GiveWeaponComponentToPed(PlayerPedId(), GetHashKey("WEAPON_PISTOL50"), GetHashKey("COMPONENT_PISTOL50_CLIP_02"))
elseif hash == GetHashKey("WEAPON_APPISTOL") then
GiveWeaponComponentToPed(PlayerPedId(), GetHashKey("WEAPON_APPISTOL"), GetHashKey("COMPONENT_APPISTOL_CLIP_02"))
elseif hash == GetHashKey("WEAPON_HEAVYPISTOL") then
GiveWeaponComponentToPed(PlayerPedId(), GetHashKey("WEAPON_HEAVYPISTOL"), GetHashKey("COMPONENT_HEAVYPISTOL_CLIP_02"))
elseif hash == GetHashKey("WEAPON_SMG") then
GiveWeaponComponentToPed(PlayerPedId(), GetHashKey("WEAPON_SMG"), GetHashKey("COMPONENT_SMG_CLIP_02"))
elseif hash == GetHashKey("WEAPON_MICROSMG") then
GiveWeaponComponentToPed(PlayerPedId(), GetHashKey("WEAPON_MICROSMG"), GetHashKey("COMPONENT_MICROSMG_CLIP_02"))
elseif hash == GetHashKey("WEAPON_ASSAULTRIFLE") then
GiveWeaponComponentToPed(PlayerPedId(), GetHashKey("WEAPON_ASSAULTRIFLE"), GetHashKey("COMPONENT_ASSAULTRIFLE_CLIP_02"))
elseif hash == GetHashKey("WEAPON_CARBINERIFLE") then
GiveWeaponComponentToPed(PlayerPedId(), GetHashKey("WEAPON_CARBINERIFLE"), GetHashKey("COMPONENT_CARBINERIFLE_CLIP_02"))
elseif hash == GetHashKey("WEAPON_ADVANCEDRIFLE") then
GiveWeaponComponentToPed(PlayerPedId(), GetHashKey("WEAPON_ADVANCEDRIFLE"), GetHashKey("COMPONENT_ADVANCEDRIFLE_CLIP_02"))
end
end
if fener == 1 then
if table.includes(flash1, hash) then
GiveWeaponComponentToPed(PlayerPedId(), hash, 0x359B7AAE)
elseif table.includes(flash2, hash) then
GiveWeaponComponentToPed(PlayerPedId(), hash, 0x7BC4CDDC)
end
end
if kaplama == 1 then
if hash == GetHashKey("WEAPON_PISTOL") then
GiveWeaponComponentToPed(PlayerPedId(), GetHashKey("WEAPON_PISTOL"), GetHashKey("COMPONENT_PISTOL_VARMOD_LUXE"))
elseif hash == GetHashKey("WEAPON_PISTOL50") then
GiveWeaponComponentToPed(PlayerPedId(), GetHashKey("WEAPON_PISTOL50"), GetHashKey("COMPONENT_PISTOL50_VARMOD_LUXE"))
elseif hash == GetHashKey("WEAPON_APPISTOL") then
GiveWeaponComponentToPed(PlayerPedId(), GetHashKey("WEAPON_APPISTOL"), GetHashKey("COMPONENT_APPISTOL_VARMOD_LUXE"))
elseif hash == GetHashKey("WEAPON_HEAVYPISTOL") then
GiveWeaponComponentToPed(PlayerPedId(), GetHashKey("WEAPON_HEAVYPISTOL"), GetHashKey("COMPONENT_HEAVYPISTOL_VARMOD_LUXE"))
elseif hash == GetHashKey("WEAPON_SMG") then
GiveWeaponComponentToPed(PlayerPedId(), GetHashKey("WEAPON_SMG"), GetHashKey("COMPONENT_SMG_VARMOD_LUXE"))
elseif hash == GetHashKey("WEAPON_MICROSMG") then
GiveWeaponComponentToPed(PlayerPedId(), GetHashKey("WEAPON_MICROSMG"), GetHashKey("COMPONENT_MICROSMG_VARMOD_LUXE"))
elseif hash == GetHashKey("WEAPON_ASSAULTRIFLE") then
GiveWeaponComponentToPed(PlayerPedId(), GetHashKey("WEAPON_ASSAULTRIFLE"), GetHashKey("COMPONENT_ASSAULTRIFLE_VARMOD_LUXE"))
elseif hash == GetHashKey("WEAPON_CARBINERIFLE") then
GiveWeaponComponentToPed(PlayerPedId(), GetHashKey("WEAPON_CARBINERIFLE"), GetHashKey("COMPONENT_CARBINERIFLE_VARMOD_LUXE"))
elseif hash == GetHashKey("WEAPON_ADVANCEDRIFLE") then
GiveWeaponComponentToPed(PlayerPedId(), GetHashKey("WEAPON_ADVANCEDRIFLE"), GetHashKey("COMPONENT_ADVANCEDRIFLE_VARMOD_LUXE"))
end
end
if tutamac == 1 then
if table.includes(grip1, hash) then
GiveWeaponComponentToPed(PlayerPedId(), hash, 0xC164F53)
end
end
if durbun == 1 then
if table.includes(scope1, hash) then
GiveWeaponComponentToPed(PlayerPedId(), hash, 0xA0D89C42)
end
end
if checkh[weapon] == hash then
SetPedAmmo(playerPed, hash, 1)
elseif Config.ItemWeapons.FuelCan == hash and ammoCount == nil then
SetPedAmmo(playerPed, hash, 4500)
else
SetPedAmmo(playerPed, hash, ammoCount or 0)
end
end, hash)
end
function table.includes(table, element)
for _, value in pairs(table) do
if value == element then
return true
end
end
return false
end
Daha Sonra m3_inventoryhud/server.lua
ESX.RegisterServerCallback('m3:inventoryhud:server:getAmmoCount', function(source, cb, hash) aşağıdaki satırlar ile değiştirin
Kod:
Kod:
ESX.RegisterServerCallback('m3:inventoryhud:server:getAmmoCount', function(source, cb, hash)
local player = ESX.GetPlayerFromId(source)
MySQL.Async.fetchAll('SELECT * FROM disc_ammo WHERE owner = @owner and hash = @hash', {
['@owner'] = player.identifier,
['@hash'] = hash
}, function(results)
if #results == 0 then
cb(nil)
else
cb(results[1].count, results[1].susturucu, results[1].fener, results[1].tutamac, results[1].kaplama, results[1].durbun, results[1].uzatilmis, ammoCount, susturucu, fener, tutamac, kaplama, durbun, uzatilmis)
end
end)
end)
VİRÜSTOTAL
Gerekli olan indirmeleri yapınız disc_ammo sql'ini değiştirmeyi unutmayınız! ardından aşağıda verilen düzenlemeleri yaparak kullanabilirsiniz.
İtems kısmına eklencek itemler : susturucu, fener, tutamac, kaplama, durbun, uzatilmis
/eklenticikart yazarak eklentileri çıkartır.
m3_inventoryhud/client.lua girip function GiveWeapon(weapon) bulup aşağıdaki satırla değiştirin
Kod:
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}
function GiveWeapon(weapon)
local checkh = Config.ItemWeapons.Throwables
local playerPed = PlayerPedId()
local hash = GetHashKey(weapon)
ESX.TriggerServerCallback('m3:inventoryhud:server:getAmmoCount', function(ammoCount, susturucu, fener, tutamac, kaplama, durbun, uzatilmis)
GiveWeaponToPed(playerPed, hash, 1, false, true)
if susturucu == 1 then
if hash == GetHashKey("WEAPON_PISTOL") then
GiveWeaponComponentToPed(PlayerPedId(), GetHashKey("WEAPON_PISTOL"), GetHashKey("component_at_pi_supp_02"))
elseif table.includes(supp1, hash) then
GiveWeaponComponentToPed(PlayerPedId(), hash, 0x837445AA)
elseif table.includes(supp2, hash) then
GiveWeaponComponentToPed(PlayerPedId(), hash, 0xA73D4664)
elseif table.includes(supp3, hash) then
GiveWeaponComponentToPed(PlayerPedId(), hash, 0xC304849A)
elseif table.includes(supp4, hash) then
GiveWeaponComponentToPed(PlayerPedId(), hash, 0xE608B35E)
end
end
if uzatilmis == 1 then
if hash == GetHashKey("WEAPON_PISTOL") then
GiveWeaponComponentToPed(PlayerPedId(), GetHashKey("WEAPON_PISTOL"), GetHashKey("COMPONENT_PISTOL_CLIP_02"))
elseif hash == GetHashKey("WEAPON_PISTOL50") then
GiveWeaponComponentToPed(PlayerPedId(), GetHashKey("WEAPON_PISTOL50"), GetHashKey("COMPONENT_PISTOL50_CLIP_02"))
elseif hash == GetHashKey("WEAPON_APPISTOL") then
GiveWeaponComponentToPed(PlayerPedId(), GetHashKey("WEAPON_APPISTOL"), GetHashKey("COMPONENT_APPISTOL_CLIP_02"))
elseif hash == GetHashKey("WEAPON_HEAVYPISTOL") then
GiveWeaponComponentToPed(PlayerPedId(), GetHashKey("WEAPON_HEAVYPISTOL"), GetHashKey("COMPONENT_HEAVYPISTOL_CLIP_02"))
elseif hash == GetHashKey("WEAPON_SMG") then
GiveWeaponComponentToPed(PlayerPedId(), GetHashKey("WEAPON_SMG"), GetHashKey("COMPONENT_SMG_CLIP_02"))
elseif hash == GetHashKey("WEAPON_MICROSMG") then
GiveWeaponComponentToPed(PlayerPedId(), GetHashKey("WEAPON_MICROSMG"), GetHashKey("COMPONENT_MICROSMG_CLIP_02"))
elseif hash == GetHashKey("WEAPON_ASSAULTRIFLE") then
GiveWeaponComponentToPed(PlayerPedId(), GetHashKey("WEAPON_ASSAULTRIFLE"), GetHashKey("COMPONENT_ASSAULTRIFLE_CLIP_02"))
elseif hash == GetHashKey("WEAPON_CARBINERIFLE") then
GiveWeaponComponentToPed(PlayerPedId(), GetHashKey("WEAPON_CARBINERIFLE"), GetHashKey("COMPONENT_CARBINERIFLE_CLIP_02"))
elseif hash == GetHashKey("WEAPON_ADVANCEDRIFLE") then
GiveWeaponComponentToPed(PlayerPedId(), GetHashKey("WEAPON_ADVANCEDRIFLE"), GetHashKey("COMPONENT_ADVANCEDRIFLE_CLIP_02"))
end
end
if fener == 1 then
if table.includes(flash1, hash) then
GiveWeaponComponentToPed(PlayerPedId(), hash, 0x359B7AAE)
elseif table.includes(flash2, hash) then
GiveWeaponComponentToPed(PlayerPedId(), hash, 0x7BC4CDDC)
end
end
if kaplama == 1 then
if hash == GetHashKey("WEAPON_PISTOL") then
GiveWeaponComponentToPed(PlayerPedId(), GetHashKey("WEAPON_PISTOL"), GetHashKey("COMPONENT_PISTOL_VARMOD_LUXE"))
elseif hash == GetHashKey("WEAPON_PISTOL50") then
GiveWeaponComponentToPed(PlayerPedId(), GetHashKey("WEAPON_PISTOL50"), GetHashKey("COMPONENT_PISTOL50_VARMOD_LUXE"))
elseif hash == GetHashKey("WEAPON_APPISTOL") then
GiveWeaponComponentToPed(PlayerPedId(), GetHashKey("WEAPON_APPISTOL"), GetHashKey("COMPONENT_APPISTOL_VARMOD_LUXE"))
elseif hash == GetHashKey("WEAPON_HEAVYPISTOL") then
GiveWeaponComponentToPed(PlayerPedId(), GetHashKey("WEAPON_HEAVYPISTOL"), GetHashKey("COMPONENT_HEAVYPISTOL_VARMOD_LUXE"))
elseif hash == GetHashKey("WEAPON_SMG") then
GiveWeaponComponentToPed(PlayerPedId(), GetHashKey("WEAPON_SMG"), GetHashKey("COMPONENT_SMG_VARMOD_LUXE"))
elseif hash == GetHashKey("WEAPON_MICROSMG") then
GiveWeaponComponentToPed(PlayerPedId(), GetHashKey("WEAPON_MICROSMG"), GetHashKey("COMPONENT_MICROSMG_VARMOD_LUXE"))
elseif hash == GetHashKey("WEAPON_ASSAULTRIFLE") then
GiveWeaponComponentToPed(PlayerPedId(), GetHashKey("WEAPON_ASSAULTRIFLE"), GetHashKey("COMPONENT_ASSAULTRIFLE_VARMOD_LUXE"))
elseif hash == GetHashKey("WEAPON_CARBINERIFLE") then
GiveWeaponComponentToPed(PlayerPedId(), GetHashKey("WEAPON_CARBINERIFLE"), GetHashKey("COMPONENT_CARBINERIFLE_VARMOD_LUXE"))
elseif hash == GetHashKey("WEAPON_ADVANCEDRIFLE") then
GiveWeaponComponentToPed(PlayerPedId(), GetHashKey("WEAPON_ADVANCEDRIFLE"), GetHashKey("COMPONENT_ADVANCEDRIFLE_VARMOD_LUXE"))
end
end
if tutamac == 1 then
if table.includes(grip1, hash) then
GiveWeaponComponentToPed(PlayerPedId(), hash, 0xC164F53)
end
end
if durbun == 1 then
if table.includes(scope1, hash) then
GiveWeaponComponentToPed(PlayerPedId(), hash, 0xA0D89C42)
end
end
if checkh[weapon] == hash then
SetPedAmmo(playerPed, hash, 1)
elseif Config.ItemWeapons.FuelCan == hash and ammoCount == nil then
SetPedAmmo(playerPed, hash, 4500)
else
SetPedAmmo(playerPed, hash, ammoCount or 0)
end
end, hash)
end
function table.includes(table, element)
for _, value in pairs(table) do
if value == element then
return true
end
end
return false
end
Daha Sonra m3_inventoryhud/server.lua
ESX.RegisterServerCallback('m3:inventoryhud:server:getAmmoCount', function(source, cb, hash) aşağıdaki satırlar ile değiştirin
Kod:
Kod:
ESX.RegisterServerCallback('m3:inventoryhud:server:getAmmoCount', function(source, cb, hash)
local player = ESX.GetPlayerFromId(source)
MySQL.Async.fetchAll('SELECT * FROM disc_ammo WHERE owner = @owner and hash = @hash', {
['@owner'] = player.identifier,
['@hash'] = hash
}, function(results)
if #results == 0 then
cb(nil)
else
cb(results[1].count, results[1].susturucu, results[1].fener, results[1].tutamac, results[1].kaplama, results[1].durbun, results[1].uzatilmis, ammoCount, susturucu, fener, tutamac, kaplama, durbun, uzatilmis)
end
end)
end)