Jump to content

RecoVantage

Members
  • Posts

    3
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

RecoVantage's Achievements

I ordered some spaghetti with marinara sauce and I got egg noodles and ketchup. I'm an average nobody.

I ordered some spaghetti with marinara sauce and I got egg noodles and ketchup. I'm an average nobody. (2/54)

0

Reputation

  1. Hello everyone, i got a problem, my problem is : I want to make a custom button in the GM of paradise whit DGS and when i do it, the button changes good but the function doesn´t work, in the inventory doesn´t work the close button, where can be the problem?? Code : y = y + line_height elseif window.type == "button" then local line_height = line_height * 2 - 4 if not window.button then window.button = exports.dgs:dgsCreateButton( x + width / 4, y + 3, width / 2, line_height - 4, tostring( window.text ), false ) addEventHandler( "onClientElementDestroy", window.button, function( ) window.button = nil end, false ) if window.onClick then addEventHandler( "onClientGUIClick", window.button, function( button, state ) if state == "up" then if button == "left" then window.onClick( 1 ) elseif button == "right" then window.onClick( 2 ) end end end, false ) end if window.id then destroy[ window.id ] = window.button else table.insert( destroy, window.button ) end else local bx, by = exports.dgs:dgsGetPosition( window.button, false ) if by ~= y + 3 then exports.dgs:dgsSetPosition( window.button, bx, y + 3, false ) end end Original code : y = y + line_height elseif window.type == "button" then local line_height = line_height * 2 - 4 if not window.button then window.button = guiCreateButton( x + width / 4, y + 3, width / 2, line_height - 4, tostring( window.text ), false ) addEventHandler( "onClientElementDestroy", window.button, function( ) window.button = nil end, false ) if window.onClick then addEventHandler( "onClientGUIClick", window.button, function( button, state ) if state == "up" then if button == "left" then window.onClick( 1 ) elseif button == "right" then window.onClick( 2 ) end end end, false ) end if window.id then destroy[ window.id ] = window.button else table.insert( destroy, window.button ) end else local bx, by = guiGetPosition( window.button, false ) if by ~= y + 3 then guiSetPosition( window.button, bx, y + 3, false ) end end
  2. Hola, buenos días, tengo un problemilla con el siguiente codigo : (Esque estoy intentando hacer un botón diferente con DGS en la GM de paradise y el problema llega aqui : El botón se crea pero no hace ninguna funccion osea deja de funccionar el botón, en el caso del inventario de paradise no cierra.) y = y + line_height elseif window.type == "button" then local line_height = line_height * 2 - 4 if not window.button then window.button = exports.dgs:dgsCreateButton( x + width / 4, y + 3, width / 2, line_height - 4, tostring( window.text ), false ) addEventHandler( "onClientElementDestroy", window.button, function( ) window.button = nil end, false ) if window.onClick then addEventHandler( "onClientGUIClick", window.button, function( button, state ) if state == "up" then if button == "left" then window.onClick( 1 ) elseif button == "right" then window.onClick( 2 ) end end end, false ) end if window.id then destroy[ window.id ] = window.button else table.insert( destroy, window.button ) end else local bx, by = exports.dgs:dgsGetPosition( window.button, false ) if by ~= y + 3 then exports.dgs:dgsSetPosition( window.button, bx, y + 3, false ) end end Codigo original : y = y + line_height elseif window.type == "button" then local line_height = line_height * 2 - 4 if not window.button then window.button = guiCreateButton( x + width / 4, y + 3, width / 2, line_height - 4, tostring( window.text ), false ) addEventHandler( "onClientElementDestroy", window.button, function( ) window.button = nil end, false ) if window.onClick then addEventHandler( "onClientGUIClick", window.button, function( button, state ) if state == "up" then if button == "left" then window.onClick( 1 ) elseif button == "right" then window.onClick( 2 ) end end end, false ) end if window.id then destroy[ window.id ] = window.button else table.insert( destroy, window.button ) end else local bx, by = guiGetPosition( window.button, false ) if by ~= y + 3 then guiSetPosition( window.button, bx, y + 3, false ) end end
×
×
  • Create New...