Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make method MP:IsPlayerPrivileged(pl) better #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Make method MP:IsPlayerPrivileged(pl) better #19

wants to merge 1 commit into from

Conversation

AMD-NICK
Copy link

@AMD-NICK AMD-NICK commented Jul 16, 2017

This fixes a possible problem if I want to create a few permission hooks.

Some addon №1

hook.Add("MediaPlayerIsPlayerPrivileged","MP.StaffAccess",function(pl)
	if pl:isStaff() then return true end
end)

Some addon №2

hook.Add("MediaPlayerIsPlayerPrivileged","MP.DonAccess",function(pl)
	if pl:isDon() then return true end
end)

In all other cases will be a conflict

This fixes a possible problem if I want to create a few permission hooks.

Some addon #1
``lua
hook.Add("MediaPlayerIsPlayerPrivileged","MP.StaffAccess",function(pl)
	if pl:isStaff() then return true end
end)
``

Some addon #2
``lua
hook.Add("MediaPlayerIsPlayerPrivileged","MP.DonAccess",function(pl)
	if pl:isDon() then return true end
end)
``

In all other cases will be a conflict
@AMD-NICK
Copy link
Author

up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant