#Donor for a specific rank in a specific group

1 messages · Page 1 of 1 (latest)

rose mica
#

Is there any way to, if a player is a Contributor in a group for example, give them Donor for all games that have that current Adonis that the plugin is in?

wooden fox
#

Yes, in a server plugin

Example: Module Server-ContributorDonor

return function(Vargs) 
  local server = Vargs.Server
  local service = Vargs.Service 

  local ContributorRank = 10

  local OldCheckDonor = server.Admin.CheckDonor
  server.Admin.CheckDonor = function(player)
    local group = server.Admin.GetPlayerGroup(player, 00000)
    if group and group.Rank >= ContributorRank then
      return true 
    end 
    return OldCheckDonor(player)
  end 
end