Sticmy Posted October 7, 2016 Share Posted October 7, 2016 Hola quisiera saber como puedo conectarme ala internal.db Estoy que hago un panel para ver todas las cuentas pero no funciona un ejemplo para conectarme? si es executeSQLQuery o dbQuery.. También quisiera saber como puedo ver todo los elementsData desde un comando uu gracias? Link to comment
Enargy, Posted October 8, 2016 Share Posted October 8, 2016 10 hours ago, MarkFlash said: quisiera saber como puedo ver todo los elementsData desde un comando uu gracias? local elementsData = {"Ping", "FPS", "Dinero"} -- Los element datas que quieras leer. function getElementsDataFrom(element) local data = {} local i = 0 while ( #data < #elementsData ) do i = i + 1 table.insert( data, { tostring(getElementData(element, elementsData[i])) } ) end return data end Link to comment
aka Blue Posted October 8, 2016 Share Posted October 8, 2016 @Gaberiel function getMyData ( thePlayer, command ) local data = getAllElementData ( thePlayer ) -- get all the element data of the player who entered the command for k, v in pairs ( data ) do -- loop through the table that was returned outputConsole ( k .. ": " .. tostring ( v ) ) -- print the name (k) and value (v) of each element data, we need to make the value a string, since it can be of any data type end end addCommandHandler ( "elemdata", getMyData ) Link to comment
Enargy, Posted October 8, 2016 Share Posted October 8, 2016 5 hours ago, aka Blue said: @Gaberiel function getMyData ( thePlayer, command ) local data = getAllElementData ( thePlayer ) -- get all the element data of the player who entered the command for k, v in pairs ( data ) do -- loop through the table that was returned outputConsole ( k .. ": " .. tostring ( v ) ) -- print the name (k) and value (v) of each element data, we need to make the value a string, since it can be of any data type end end addCommandHandler ( "elemdata", getMyData ) No me acordaba que existía esa xd. Tengo que repasarme la wiki Link to comment
Recommended Posts