Jump to content

inventory-toggleControl problem


greentumbleweed

Recommended Posts

i have the areas where toggleControl is not working -------here

function showInventory (key,keyState,thePlayer)
	if getElementData(getLocalPlayer(),"isDead",true) then return end
	if getElementData(getLocalPlayer(),"logedin") then
		if ( keyState == "down" ) then
				guiSetVisible(inventoryWindows,not guiGetVisible(inventoryWindows))
			showCursor(false)
			toggleControl("fire",true);-------------here
			refreshInventory()
			if guiGetVisible(inventoryWindows) == true then
				onClientOpenInventoryStopMenu ()
				showCursor(true,false)
				toggleControl("fire",false);--------here
			else
				hideRightClickInventoryMenu ()
				if isPlayerInLoot() then
					if getElementData ( isPlayerInLoot(), "itemloot" ) then
						triggerServerEvent ("startUpdatingLoot",isPlayerInLoot())
					end
				end
			end
			guiSetVisible(checkBox["hidetent"],false)
			if isPlayerInLoot() then
				local col = getElementData(getLocalPlayer(),"currentCol")
				local gearName = getElementData(getLocalPlayer(),"lootname")
				if getElementData(col,"tent") then
					guiSetVisible(checkBox["hidetent"],true)
					if getElementData(col,"hidetent") == false then
						guiCheckBoxSetSelected(checkBox["hidetent"],true)
					else
						guiCheckBoxSetSelected(checkBox["hidetent"],false)
					end
				else
					guiSetVisible(checkBox["hidetent"],false)
				end
				refreshLoot(col,gearName)
			end
		end
	end
end
bindKey ( "j", "down", showInventory )

 

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...