Skip to content

Commit

Permalink
Fix shwhitelist
Browse files Browse the repository at this point in the history
не помню в чем тут было дело
  • Loading branch information
AMD-NICK committed May 19, 2023
1 parent 0537134 commit 94fb00f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions addons/igs-core/lua/igs/extensions/shwhitelist.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
-- Автор @Joch
-- https://forum.gm-donate.net/t/sh-whitelist-dobavlenie-professii/2129/7
-- Тут и пример использования
-- https://forum.gm-donate.net/t/2129/7

local ITEM = FindMetaTable("IGSItem")

Expand All @@ -9,7 +10,7 @@ function ITEM:SetSHWhitelist(team_cmd)
return "Вы в вайтлисте"
end
end):AddHook("SH_WHITELIST.CanBecomeJob", function(pl, job)
return job.command == team_cmd
if job.command == team_cmd then return true end
end):SetValidator(function(pl)
return SH_WHITELIST:CanBecomeJob(pl, DarkRP.getJobByCommand(team_cmd))
end)
Expand Down

0 comments on commit 94fb00f

Please sign in to comment.