FreeGells Posted February 5, 2013 Posted February 5, 2013 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.
FreeGells Posted February 5, 2013 Author Posted February 5, 2013 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)
Castillo Posted February 5, 2013 Posted February 5, 2013 Well, maybe these aren't set as element data?
FreeGells Posted February 5, 2013 Author Posted February 5, 2013 I think so, but i can use setElementData... Ex: setElementData(getPlayerFromName("FreeGells"),"Sniper Rifle",2)
FreeGells Posted February 5, 2013 Author Posted February 5, 2013 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
Castillo Posted February 5, 2013 Posted February 5, 2013 And that element data doesn't appear on getAllElementData?
FreeGells Posted February 5, 2013 Author Posted February 5, 2013 Don't! Appears only: "Water Bottle: 0" and "Wood: 0" when i execute the command.
TAPL Posted February 5, 2013 Posted February 5, 2013 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)
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now