Jump to content

Como eu posso incrementar esse if not nessa função


Recommended Posts

Eu queria incrementar o seguinte if nessa função; if (not getElementData(objects, "eventBox->Use")) or false then  Que quando o jogador estivesse com um tal evento em uso, não daria como ele execultar o "Usar" 
elseif value == "Usar" then
    useItem(UsarItem[1],UsarItem[2],UsarItem[3],UsarItem[4],UsarItem[5]) 


Como eu poderia aplicar esse if aí em baixo? 

elseif state == "down" and button == "left" and confirmando then
	--if button == 'left' and state == 'up' and showInventory and bodySearch and confirmando then
    for index, value in ipairs(showmenu) do
	if isMouseInPosition(posx, posy - index * 40, sx*80, sy*20) then
	if value == "Cancelar" then 
	UsarItem = {}
	confirmando = false
	movedItem = {}
	elseif value == "Usar" then
	useItem(UsarItem[1],UsarItem[2],UsarItem[3],UsarItem[4],UsarItem[5])
	confirmando = false
	UsarItem = {}
	movedItem = {}
	elseif value == "Mostrar" then
        local startTime = getTickCount()
        setElementData(localPlayer, "char >> showedItem", { true, UsarItem[3], getItemName(UsarItem[3]), getItemDescription(UsarItem[3]), getTickCount() })
        outputChatBox("Mostrou o item: #F7CA18" .. getElementData(localPlayer, "char >> showedItem")[3], 255, 255, 255, true)
        triggerServerEvent("bbbMTA->#setPlayer", localPlayer, localPlayer, "MOSTROU (" .. getItemName(UsarItem[3]) .. ")")
        setTimer(function()
        setElementData(localPlayer, "char >> showedItem", { false, nil, nil, nil, nil })
        end, 5000, 1)
		UsarItem = {}
		confirmando = false	
		movedItem = {}
    end
	end
	end

 

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...