Jump to content

Error: call: failed to call 'item-system:getBadges' [Sting?]


Recommended Posts

Script And Item-system Script

Script

function initStuff(res) 
    if (res == getThisResource() and getResourceFromName("item-system")) or getResourceName(res) == "item-system" then 
        for key, value in pairs(exports['item-system']:getBadges()) do 
            badges[value[1]] = { value[4][1], value[4][2], value[4][3], value[5] } 
        end 
         
        masks = exports['item-system']:getMasks() 
    end 
end 
addEventHandler("onClientResourceStart", getRootElement(), initStuff) 

Item-system Script

-- 
-- Badges 
-- 
  
function getBadges( ) 
    return { 
        -- [itemID] = {elementData, name, factionIDs, color, iconID} 
        [64]  = { "PDbadge",        "a Police Badge",           {[1] = true},                   {0,100,255},    2}, 
        [65]  = { "ESbadge",        "an Emergency Services ID", {[2] = "LSMS", [4] = "LSFD"},   {175,50,50},    1}, 
        [86]  = { "SANbadge",       "a SAN ID",                 {[20] = true},                  {150,150,255},  1}, 
        [87]  = { "GOVbadge",       "a Government Badge",       {[3] = true},                   {50,150,50},    1}, 
        [82]  = { "HexID",          "a Hex Towing ID",          {[30] = true},                  {255,99,0},     1}, 
        [112] = { "SheriffBadge",   "a State Police badge",     {[87] = true},                  {0,155,255},    2}, 
        [119] = { "UniTelID",       "a UNI-TEL ID",             {[125] = true},                 {150,255,255},  1}, 
    } 
end 
  
-- 
-- Mask Data 
-- 
function getMasks( ) 
    return { 
        -- [itemID] = { elementData, textWhenPuttingOn, textWhentakingOff } 
        [26]  = {"gasmask", "slips a black gas mask over their face",   "slips a black gas mask off their face"}, 
        [56]  = {"mask",    "slips a mask over their face",             "slips a mask off their face"}, 
        [90]  = {"helmet",  "puts a helmet over their head",            "takes a helmet off their head"}, 
        [120] = {"scuba",   "puts scuba gear on",                       "takes scuba gear off"}, 
    } 
end 

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...