@Wulf is this code still accurate? Seems to only work sometimesCode:function PLUGIN:TotalAccess(player)local sid = rust.UserIDFromPlayer(player) local total = true localbuildingPrivileges = global.BasePlayer._type:GetField("buildingPrivlidges", rust.PrivateBindingFlag() ) bldpriv = localbuildingPrivileges:GetValue(player) for i=0, bldpriv.Count-1 do --print("Found a Tool Cupboard, getting names of allowed users") locAllowed = bldpriv[i].authorizedPlayers for u=0, locAllowed.Count-1 do --print(player.userID .. "/" .. locAllowed[u].userid) if player.userID ~= locAllowed[u].userid then total = false end end end if total == false then print("(INFO): " .. player.displayName .. " does not have access to all cupboards nearby.") end return totalend
[DOUBLEPOST=1450398690][/DOUBLEPOST]Seems to only work if u are the only one authed to that cupboard .. . . is this normal? is this where friends plugin comes in handy?
[DOUBLEPOST=1450398979][/DOUBLEPOST]My goal is to return true if the player has all cupboard access nearby...welp!
[DOUBLEPOST=1450400391][/DOUBLEPOST]think i got it, can we remove this post?
Solved Does player have cupboard?
Discussion in 'Rust Development' started by Rusty, Dec 17, 2015.