Jump to content

Sticmy

Recommended Posts

Posted

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?

Posted
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

 

Posted

@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 )

 

Posted
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 :(

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...