HERAKLES Otomatik Avlı kalıcı sunucu. 19 Haziran'da açılıyor. Atius & Wizard güvencesiyle hemen kayıt ol, ön kayıt ödülleri aktif. HEMEN TIKLA!
Merhaba dostlar. Forumda çok disc-inventoryhud'u motele entegre etme olayı döndü ancak çoğu (neredeyse tamamı) işe yaramamakta. Kendim de kullandığım kodu sizinle paylaşmak istedim 
İlk olarak disc-inventoryhud/server/stash.lua kısmına girip şu kodu yazıyoruz:
[CODE title="Yatak"]Citizen.CreateThread(function()
TriggerEvent('disc-inventoryhud:RegisterInventory', {
name = 'yatak',
label = _U('motelyatak'),
slots = 100
})
end)[/CODE]
[CODE title="Çekmece"]Citizen.CreateThread(function()
TriggerEvent('disc-inventoryhud:RegisterInventory', {
name = 'cekmece',
label = _U('motel'),
slots = 100
})
end)[/CODE]
Eğer orijinaline sahipseniz stash.lua şu şekilde gözükecektir:
[CODE title="KOD"]Citizen.CreateThread(function()
TriggerEvent('disc-inventoryhud:RegisterInventory', {
name = 'stash',
label = _U('stash'),
slots = 100
})
end)
Citizen.CreateThread(function()
TriggerEvent('disc-inventoryhud:RegisterInventory', {
name = 'cekmece',
label = _U('motelyatak'),
slots = 100
})
end)
Citizen.CreateThread(function()
TriggerEvent('disc-inventoryhud:RegisterInventory', {
name = 'yatak',
label = _U('motel'),
slots = 100
})
end)[/CODE]
Disc-inventoryhud için stash'leri açtık, sıra geldi motele entegre etmeye. Birkaç adet örnek yazacağım buraya lsrp-motels için.
LSRP-MOTELS (Denemedim, kendi yapabildiğim kadar yazıyorum bir hata olursa yazın.)
lsrp-motels/client/client.lua kısmına gelip şunu aratalım:
[CODE title="KOD"] -- Bed Stash Marker Yatak altı için
for k,v in pairs(Config.Zones) do
distance = GetDistanceBetweenCoords(coords, v.BedStash.x, v.BedStash.y, v.BedStash.z, true)
if distance < 1.0 then
if roomOwner == playerIdent then
DrawText3D(v.BedStash.x, v.BedStash.y, v.BedStash.z + 0.1, 'Press [~g~E~s~] to access stash.')
if IsControlJustReleased(0, Keys['E']) then
exports["esx_inventoryhud"]:refreshPropertyMotelBedInventory()
OpenStash()
end
end
end
end
end[/CODE]
Ardından ise bu kodu şununla değiştirelim:
[CODE title="KOD"]-- Bed Stash Marker
for k,v in pairs(Config.Zones) do
distance = GetDistanceBetweenCoords(coords, v.BedStash.x, v.BedStash.y, v.BedStash.z, true)
if distance < 1.0 then
if roomOwner == playerIdent then
DrawText3D(v.BedStash.x, v.BedStash.y, v.BedStash.z + 0.1, 'Press [~g~E~s~] to access stash.')
if IsControlJustReleased(0, Keys['E']) then
TriggerEvent('disc-inventoryhud
penInventory', {
type = 'yatak',
owner = curRoomOwner, -- olmassa playerIdent deneyin.
slots = 80,
})
end
end
end
end
end[/CODE]
Normal çekmeceyi tam çözemedim, deneyeceğim ardından ise burayı güncelleyeceğim. Bu sadece yatak altı için şu anlık.
Ardından ise disc-inventoryhud/locales/en.lua'ya girelim ve şunları ekleyelim:
[CODE title="KOD"]['motelyatak'] = "Yatak Alti",
['motel'] = "Cekmece",[/CODE]
Bu kadar. Daha tam denemedim o yüzden kodlar büyük ihtimalle yanlış. Deneyen arkadaş olursa haber versin, fixlenmiş hali olan biri varsa da yazsın buraya güncelleyeyim.

İlk olarak disc-inventoryhud/server/stash.lua kısmına girip şu kodu yazıyoruz:
[CODE title="Yatak"]Citizen.CreateThread(function()
TriggerEvent('disc-inventoryhud:RegisterInventory', {
name = 'yatak',
label = _U('motelyatak'),
slots = 100
})
end)[/CODE]
[CODE title="Çekmece"]Citizen.CreateThread(function()
TriggerEvent('disc-inventoryhud:RegisterInventory', {
name = 'cekmece',
label = _U('motel'),
slots = 100
})
end)[/CODE]
Eğer orijinaline sahipseniz stash.lua şu şekilde gözükecektir:
[CODE title="KOD"]Citizen.CreateThread(function()
TriggerEvent('disc-inventoryhud:RegisterInventory', {
name = 'stash',
label = _U('stash'),
slots = 100
})
end)
Citizen.CreateThread(function()
TriggerEvent('disc-inventoryhud:RegisterInventory', {
name = 'cekmece',
label = _U('motelyatak'),
slots = 100
})
end)
Citizen.CreateThread(function()
TriggerEvent('disc-inventoryhud:RegisterInventory', {
name = 'yatak',
label = _U('motel'),
slots = 100
})
end)[/CODE]
Disc-inventoryhud için stash'leri açtık, sıra geldi motele entegre etmeye. Birkaç adet örnek yazacağım buraya lsrp-motels için.
LSRP-MOTELS (Denemedim, kendi yapabildiğim kadar yazıyorum bir hata olursa yazın.)
lsrp-motels/client/client.lua kısmına gelip şunu aratalım:
[CODE title="KOD"] -- Bed Stash Marker Yatak altı için
for k,v in pairs(Config.Zones) do
distance = GetDistanceBetweenCoords(coords, v.BedStash.x, v.BedStash.y, v.BedStash.z, true)
if distance < 1.0 then
if roomOwner == playerIdent then
DrawText3D(v.BedStash.x, v.BedStash.y, v.BedStash.z + 0.1, 'Press [~g~E~s~] to access stash.')
if IsControlJustReleased(0, Keys['E']) then
exports["esx_inventoryhud"]:refreshPropertyMotelBedInventory()
OpenStash()
end
end
end
end
end[/CODE]
Ardından ise bu kodu şununla değiştirelim:
[CODE title="KOD"]-- Bed Stash Marker
for k,v in pairs(Config.Zones) do
distance = GetDistanceBetweenCoords(coords, v.BedStash.x, v.BedStash.y, v.BedStash.z, true)
if distance < 1.0 then
if roomOwner == playerIdent then
DrawText3D(v.BedStash.x, v.BedStash.y, v.BedStash.z + 0.1, 'Press [~g~E~s~] to access stash.')
if IsControlJustReleased(0, Keys['E']) then
TriggerEvent('disc-inventoryhud
penInventory', {type = 'yatak',
owner = curRoomOwner, -- olmassa playerIdent deneyin.
slots = 80,
})
end
end
end
end
end[/CODE]
Normal çekmeceyi tam çözemedim, deneyeceğim ardından ise burayı güncelleyeceğim. Bu sadece yatak altı için şu anlık.
Ardından ise disc-inventoryhud/locales/en.lua'ya girelim ve şunları ekleyelim:
[CODE title="KOD"]['motelyatak'] = "Yatak Alti",
['motel'] = "Cekmece",[/CODE]
Bu kadar. Daha tam denemedim o yüzden kodlar büyük ihtimalle yanlış. Deneyen arkadaş olursa haber versin, fixlenmiş hali olan biri varsa da yazsın buraya güncelleyeyim.
Şu an konuyu görüntüleyenler (Toplam : 0, Üye: 0, Misafir: 0)
Benzer konular
- Cevaplar
- 0
- Görüntüleme
- 2K
- Cevaplar
- 3
- Görüntüleme
- 927
- Cevaplar
- 0
- Görüntüleme
- 1K
- Cevaplar
- 1
- Görüntüleme
- 3K
