Jump to content

Anonym1337

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by Anonym1337

  1. Здравствуйте, не подскажите как сделать проверку на предмет в инвентаре. Вот есть код. function toggleVisible ( ) guiSetVisible ( myWindow, not guiGetVisible(myWindow) ) showCursor(not isCursorShowing()) end bindKey( "F6", "down", toggleVisible) Надо что бы было так, если у игрока есть в инвентаре книга то у него открывалась это меню на F6, если нету тогда не открывалась. Я пробовал так: function toggleVisible ( ) if getElementData(getLocalPlayer(),"Книга") >= 1 then toggleVisible ("myWindow",true) end guiSetVisible ( myWindow, not guiGetVisible(myWindow) ) showCursor(not isCursorShowing()) end bindKey( "F6", "down", toggleVisible) И вот так: function toggleVisible ( ) if getElementData(getLocalPlayer(),"Книга") >= 0 then toggleVisible ("myWindow",false) end guiSetVisible ( myWindow, not guiGetVisible(myWindow) ) showCursor(not isCursorShowing()) end bindKey( "F6", "down", toggleVisible) Но как видите я здесь, нужна помощь. Спасибо за ранее.
  2. Здравствуйте, не подскажите как сделать проверку на предмет в инвентаре. Вот есть код. function toggleVisible ( ) guiSetVisible ( myWindow, not guiGetVisible(myWindow) ) showCursor(not isCursorShowing()) end bindKey( "F6", "down", toggleVisible) Надо что бы было так, если у игрока есть в инвентаре книга то у него открывалась это меню на F6, если нету тогда не открывалась. Я пробовал так: function toggleVisible ( ) if getElementData(getLocalPlayer(),"Книга") >= 1 then toggleVisible ("myWindow",true) end guiSetVisible ( myWindow, not guiGetVisible(myWindow) ) showCursor(not isCursorShowing()) end bindKey( "F6", "down", toggleVisible) И вот так: function toggleVisible ( ) if getElementData(getLocalPlayer(),"Книга") >= 0 then toggleVisible ("myWindow",false) end guiSetVisible ( myWindow, not guiGetVisible(myWindow) ) showCursor(not isCursorShowing()) end bindKey( "F6", "down", toggleVisible) Но как видите я здесь, нужна помощь. Спасибо за ранее.
×
×
  • Create New...