micheal1230 Posted May 25, 2012 Share Posted May 25, 2012 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
Alpha Posted May 25, 2012 Share Posted May 25, 2012 Show Item-system resource's meta.xml. Link to comment
Kenix Posted May 25, 2012 Share Posted May 25, 2012 You should add exported function getBadges to meta.xml function="function_name" type="server/client" http="true/false" /> Link to comment
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