- Katılım
- 4 yıl 4 ay 5 gün
- Mesajlar
- 63
- Discord
- Oğuz#5547
Merhabalar, m3 lootinv kullanıyorum fakat ilk defa anlam veremediğim ibr sorunla karşılaştım. Belki Çözümünü bilen vardır. Bana oyun içi export olarak gelen bildirimlerin code satırlarını paylaşıyorum.
Animasyonlarına kadar kendi sistemime göre uyarlı
Fonction Registerinden alınan kısım
elseif type == 'player' then
if IsEntityPlayingAnim(GetPlayerPed(targetplayer), 'random@mugging3', 'handsup_enter', 3) then
local name = 'Oyuncu-'..target
ESX.TriggerServerCallback('m3:inventoryhud:server:checkOpenable', function(openable)
if openable then
TriggerServerEvent('m3:inventoryhud:server:disableTargetInv', target)
refreshTargetInventory(target)
Wait(150)
loadPlayerInventory()
Wait(150)
isInInventory = true
SendNUIMessage({
action = "display",
type = "player",
text = 'Oyuncu-'..GetPlayerServerId(PlayerId())
})
SetNuiFocus(true, true)
secondary = name
else
loadPlayerInventory()
isInInventory = true
SendNUIMessage({
action = "display",
type = "normal",
text = 'Oyuncu-'..GetPlayerServerId(PlayerId())
})
SetNuiFocus(true, true)
end
end, name)
else
--->> exports['mythic_notify']:SendAlert('error', 'Kişi ellerini kaldırmamış!', 3000)
end
Diğer Function
function openInventory()
TriggerScreenblurFadeIn(0)
ESX.UI.Menu.CloseAll()-- this also closes any esx menus to prevent from society inventory duping
if openableself then
if not IsEntityPlayingAnim(PlayerPedId(), "random@mugging3", "handsup_enter", 3) then
local pCoords = GetEntityCoords(PlayerPedId())
local entity, entityDst = ESX.Game.GetClosestObject(Config.GarbageProps)
if DoesEntityExist(entity) and entityDst <= 2 then
-- TriggerServerEvent('m3:inventoryhud:server:freezeGarbage', entity)
local x, y, z = table.unpack(GetEntityCoords(entity))
local _, floorZ = GetGroundZFor_3dCoord(x, y, z)
local name = 'Çöp Konteyneri-'..getOwnerFromCoordsForGarbage(vector3(x, y, floorZ))
ESX.TriggerServerCallback('m3:inventoryhud:server:checkOpenable', function(openable)
if openable then
ESX.TriggerServerCallback('m3:inventoryhud:server:getGarbage', function(table)
SendNUIMessage({
action = "setInfoText",
text = name
})
SendNUIMessage({
action = "setSecondInventoryItems",
itemList = table
})
loadPlayerInventory()
isInInventory = true
SendNUIMessage({
action = "display",
type = "garbage",
text = 'Oyuncu-'..GetPlayerServerId(PlayerId())
})
SetNuiFocus(true, true)
secondary = name
end, name)
else
loadPlayerInventory()
isInInventory = true
SendNUIMessage({
action = "display",
type = "normal",
text = 'Oyuncu-'..GetPlayerServerId(PlayerId())
})
SetNuiFocus(true, true)
end
end, name, entity)
else
ESX.Streaming.RequestAnimDict('pickup_object', function()
TaskPlayAnim(PlayerPedId(), 'pickup_object', 'putdown_low', 8.0, -8, -1, 48, 0, 0, 0, 0)
end)
local x, y, z = table.unpack(GetEntityCoords(PlayerPedId()))
local name = 'Yer-'..getOwnerFromCoords(vector3(x, y, z))
ESX.TriggerServerCallback('m3:inventoryhud:server:checkOpenable', function(openable)
if openable then
ESX.TriggerServerCallback('m3:inventoryhud:server:getDrop', function(table)
SendNUIMessage({
action = "setInfoText",
text = name
})
SendNUIMessage({
action = "setSecondInventoryItems",
itemList = table
})
loadPlayerInventory()
isInInventory = true
SendNUIMessage({
action = "display",
type = "drop",
text = 'Oyuncu-'..GetPlayerServerId(PlayerId())
})
SetNuiFocus(true, true)
secondary = name
end, name)
else
loadPlayerInventory()
isInInventory = true
SendNUIMessage({
action = "display",
type = "normal",
text = 'Oyuncu-'..GetPlayerServerId(PlayerId())
})
SetNuiFocus(true, true)
end
end, name)
end
else
exports['mythic_notify']:SendAlert('error', 'Ellerin havadayken eşyalarına bakamazsın!', 3000)
end
else
exports['mythic_notify']:SendAlert('error', 'Eşyalarına şuan bir başkası bakıyor!', 3000)
end
end
Animasyonlarına kadar kendi sistemime göre uyarlı
Fonction Registerinden alınan kısım
elseif type == 'player' then
if IsEntityPlayingAnim(GetPlayerPed(targetplayer), 'random@mugging3', 'handsup_enter', 3) then
local name = 'Oyuncu-'..target
ESX.TriggerServerCallback('m3:inventoryhud:server:checkOpenable', function(openable)
if openable then
TriggerServerEvent('m3:inventoryhud:server:disableTargetInv', target)
refreshTargetInventory(target)
Wait(150)
loadPlayerInventory()
Wait(150)
isInInventory = true
SendNUIMessage({
action = "display",
type = "player",
text = 'Oyuncu-'..GetPlayerServerId(PlayerId())
})
SetNuiFocus(true, true)
secondary = name
else
loadPlayerInventory()
isInInventory = true
SendNUIMessage({
action = "display",
type = "normal",
text = 'Oyuncu-'..GetPlayerServerId(PlayerId())
})
SetNuiFocus(true, true)
end
end, name)
else
--->> exports['mythic_notify']:SendAlert('error', 'Kişi ellerini kaldırmamış!', 3000)
end
Diğer Function
function openInventory()
TriggerScreenblurFadeIn(0)
ESX.UI.Menu.CloseAll()-- this also closes any esx menus to prevent from society inventory duping
if openableself then
if not IsEntityPlayingAnim(PlayerPedId(), "random@mugging3", "handsup_enter", 3) then
local pCoords = GetEntityCoords(PlayerPedId())
local entity, entityDst = ESX.Game.GetClosestObject(Config.GarbageProps)
if DoesEntityExist(entity) and entityDst <= 2 then
-- TriggerServerEvent('m3:inventoryhud:server:freezeGarbage', entity)
local x, y, z = table.unpack(GetEntityCoords(entity))
local _, floorZ = GetGroundZFor_3dCoord(x, y, z)
local name = 'Çöp Konteyneri-'..getOwnerFromCoordsForGarbage(vector3(x, y, floorZ))
ESX.TriggerServerCallback('m3:inventoryhud:server:checkOpenable', function(openable)
if openable then
ESX.TriggerServerCallback('m3:inventoryhud:server:getGarbage', function(table)
SendNUIMessage({
action = "setInfoText",
text = name
})
SendNUIMessage({
action = "setSecondInventoryItems",
itemList = table
})
loadPlayerInventory()
isInInventory = true
SendNUIMessage({
action = "display",
type = "garbage",
text = 'Oyuncu-'..GetPlayerServerId(PlayerId())
})
SetNuiFocus(true, true)
secondary = name
end, name)
else
loadPlayerInventory()
isInInventory = true
SendNUIMessage({
action = "display",
type = "normal",
text = 'Oyuncu-'..GetPlayerServerId(PlayerId())
})
SetNuiFocus(true, true)
end
end, name, entity)
else
ESX.Streaming.RequestAnimDict('pickup_object', function()
TaskPlayAnim(PlayerPedId(), 'pickup_object', 'putdown_low', 8.0, -8, -1, 48, 0, 0, 0, 0)
end)
local x, y, z = table.unpack(GetEntityCoords(PlayerPedId()))
local name = 'Yer-'..getOwnerFromCoords(vector3(x, y, z))
ESX.TriggerServerCallback('m3:inventoryhud:server:checkOpenable', function(openable)
if openable then
ESX.TriggerServerCallback('m3:inventoryhud:server:getDrop', function(table)
SendNUIMessage({
action = "setInfoText",
text = name
})
SendNUIMessage({
action = "setSecondInventoryItems",
itemList = table
})
loadPlayerInventory()
isInInventory = true
SendNUIMessage({
action = "display",
type = "drop",
text = 'Oyuncu-'..GetPlayerServerId(PlayerId())
})
SetNuiFocus(true, true)
secondary = name
end, name)
else
loadPlayerInventory()
isInInventory = true
SendNUIMessage({
action = "display",
type = "normal",
text = 'Oyuncu-'..GetPlayerServerId(PlayerId())
})
SetNuiFocus(true, true)
end
end, name)
end
else
exports['mythic_notify']:SendAlert('error', 'Ellerin havadayken eşyalarına bakamazsın!', 3000)
end
else
exports['mythic_notify']:SendAlert('error', 'Eşyalarına şuan bir başkası bakıyor!', 3000)
end
end