PashaBiceps Posted April 26, 2019 Posted April 26, 2019 Boa tarde, eu construi um inventário e quase tudo está funcionando perfeitamente. Porém o inventário está para todo mundo no servidor, todo mundo usa o mesmo inventário e o que eu queria cada um ter o seu inventário. Não sei o que está errado, o que pode ser? Não dá erros nem nada, desanimei muito. Obrigado pela ajuda desde já É assim que abro o inventário bindKey('i', 'down', function () if isPedDead(localPlayer) then outputChatBox("Tu não podes abrir o inventário morto!", 255, 255, 255, true) return end if getElementData(localPlayer, 'charFollow') or false then outputChatBox("Não podes abrir o inventário porque alguém te leva!", 255, 255, 255, true) return end if getElementData(localPlayer, 'timedOut') or false then outputChatBox("Só podes abrir o inventário em 5 segundos!", 255, 255, 255, true) return end if getElementData(localPlayer, 'algemado') or false then outputChatBox("Não podes abrir o inventário porque estás algemado!", 255, 255, 255, true) return end if not startCraft then showInventory = not showInventory if showInventory then cursorInSlot = {-1, -1, -1, -1} movedItem = {-1, -1, -1, -1} openInventory(localPlayer) activeInvState = 'bag' craftTick = 0 playSound("files/sounds/open.mp3", false) setTimer(function() removeEventHandler('onClientRender', root, drawInventory) addEventHandler('onClientRender', root, drawInventory, true, 'low-5') end, 50, 1) toggleControl ("fire", false) else bodySearch = true showInventory = false cursorinInventory = false isMove = false cursorInSlot = {-1, -1, -1, -1} movedItem = {-1, -1, -1, -1} itemTable = playerItemTable playSound("files/sounds/close.mp3", false) setElementData(localPlayer, "playerInUse", false) setElementData(localPlayer, 'char >> element', false) removeEventHandler('onClientRender', root, drawInventory) if getElementType(inventoryElement) == 'vehicle' then setElementData(inventoryElement, "clickToVehicle", 0) setElementData(inventoryElement, "inUse", false) triggerServerEvent('krtMTA->#doorState', inventoryElement, inventoryElement, 0) end toggleControl ("fire", true) inventoryElement = localPlayer end end end)
Other Languages Moderators Lord Henry Posted April 26, 2019 Other Languages Moderators Posted April 26, 2019 (edited) Mesma dúvida que esse cara: Parecem até a mesma pessoa. Bem suspeito isso ae. Edited April 26, 2019 by Lord Henry 2
PashaBiceps Posted April 26, 2019 Author Posted April 26, 2019 3 minutes ago, Lord Henry said: Mesma dúvida que esse cara: Parecem até a mesma pessoa. Bem suspeito isso ae. Oxi.. Se fosse a mesma, postaria lá não aqui kkk
Fitsy Posted April 26, 2019 Posted April 26, 2019 18 minutes ago, Lord Henry said: Mesma dúvida que esse cara: Parecem até a mesma pessoa. Bem suspeito isso ae. Amigo a duvida é a mesma porem não somos a mesma pessoa não ia fazer sentido ne....
DNL291 Posted April 28, 2019 Posted April 28, 2019 @GodKraken Seu código não ajuda em nada, esse trecho ao meu ver não expõe o problema mencionado. O que eu acho é que as tabelas dos itens estão sendo compartilhadas entre os jogadores em outra parte do código.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now