Plate Posted April 30, 2013 Share Posted April 30, 2013 Hola alguien me podria decir por que esto no anda function useItemHealth() local row, col = guiGridListGetSelectedItem ( itemGrid ) if ( row and col and row ~= -1 and col ~= -1 ) then local itemH = guiGridListGetItemText ( itemGrid, row, 1 ) if (itemH == "Vida") then setElementHealth(localPlayer, 100) end end end addEventHandler("onClientGUIClcik", Usar, useItemHealth, false) Link to comment
Castillo Posted April 30, 2013 Share Posted April 30, 2013 Tenes mal el evento: "onClientGUIClcik". Link to comment
Plate Posted April 30, 2013 Author Share Posted April 30, 2013 Sigue sin funcionar function useItemHealth() local row, col = guiGridListGetSelectedItem ( itemGrid ) if ( row and col and row ~= -1 and col ~= -1 ) then local itemH = guiGridListGetItemText ( itemGrid, row, 1 ) if (itemH == "Vida") then setElementHealth(localPlayer, 100) end end end addEventHandler("onClientGUIClick", UsarI, useItemHealth, false) Link to comment
Renkon Posted April 30, 2013 Share Posted April 30, 2013 Porque no debuggeas linea por línea asi te das cuenta que puede llegar a estar mal? Link to comment
Plate Posted April 30, 2013 Author Share Posted April 30, 2013 probe usando un trigger y en el trigger use un outputChatBox pero el chatBox no funciona supongo que deve ser en el "itemH" Link to comment
Renkon Posted April 30, 2013 Share Posted April 30, 2013 y prueba outputear el valor de ITEMH lol Link to comment
Plate Posted April 30, 2013 Author Share Posted April 30, 2013 Ya esta gracias Solid y Renkon Link to comment
Recommended Posts