Jump to content

GetAllElementData


FreeGells

Recommended Posts

Hello! I trying pickup the element data , to make a panel, but the GetAllElementData dont work ): please help me.

Code:

function getMyData(thePlayer, command) 
    local data = getAllElementData(thePlayer) 
    for k, v in pairs(data) do 
        outputChatBox(k .. ": " .. v, thePlayer) 
    end 
end 
addCommandHandler("teste", getMyData) 

I Pickup this in the wiki.

Link to comment

I had forgotten that :/ but... i want all the datas, ex: blood, painkillers, m4, assault ammo, etc... (i'm using DayZ Gamemode), and only print Water Bottle and Wood datas :/ how i view all the datas ? And in the log have this:

attempt to concatenate local 'v' (a boolean value)
Link to comment

No, it give me 2 Sniper Rifles, if i use:

setElementData(getPlayerFromName("FreeGells"),"Sniper Ammo", 10) 

I Get 10 Sniper Ammo. (This show in my inventory, if i use admin painel in "p" then dont put sniper/ammo in inventory).

@EDIT

I Think the value is a boolean, and is 'true' or 'false', not a integer value

Link to comment
function getMyData(thePlayer, command) 
    local data = getAllElementData(thePlayer) 
    for k, v in pairs(data) do 
        outputChatBox(tostring(k) .. ": " .. tostring(v), thePlayer) 
    end 
end 
addCommandHandler("teste", getMyData) 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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