Skip to content

Instantly share code, notes, and snippets.

@MattJeanes
Last active August 29, 2015 14:13
Show Gist options
  • Save MattJeanes/16f43182496815f96b2c to your computer and use it in GitHub Desktop.
Save MattJeanes/16f43182496815f96b2c to your computer and use it in GitHub Desktop.
Can be used to mass set/unset privileges
local thing=""
for k,v in pairs(evolve.privileges) do
if string.sub(v,0,thing:len())==thing then
local privilege = v
for k,v in pairs(evolve.ranks) do
local rank = k
if v.Immunity>=15 and v.Immunity < 99 then
if ( !table.HasValue( evolve.ranks[ rank ].Privileges, privilege ) ) then
table.insert( evolve.ranks[ rank ].Privileges, privilege )
end
local enabled=1
if Abyss and not evolve.offline then
Abyss:UpdatePrivilege(rank,privilege,enabled)
end
umsg.Start( "EVRankPrivilege" )
umsg.String( rank )
umsg.Short( evolve:KeyByValue( evolve.privileges, privilege ) )
umsg.Bool( enabled )
umsg.End()
end
end
end
end
evolve:SaveRanks()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment