Skip to main content

getLoadout

xPlayer.getLoadout()

This function returns the player loadout.

Returned Table Content

The returned table contains an index-value table, and for each child there is a key-value table with the following content:

ChildData TypeExplanation
namestringWeapon name
ammonumberWeapon ammo
labelstringWeapon label
componentstableWeapon component(s)

Example

for k,v in ipairs(xPlayer.getLoadout()) do
print("Name: ".. v.name .. " Ammo: ".. v.ammo)
end