Skip to content

Commit 072d988

Browse files
authored
Merge pull request #12 from Astralcircle/patch-1
Allow specify custom message when blocking loadout
2 parents da0ada4 + 9d88004 commit 072d988

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lua/custom_loadout/sv_main.lua

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,11 @@ function CLoadout:IsAvailableForPlayer( ply )
1919
if ply.GetBuild and ply:GetBuild() then
2020
return false, "Your loadout will be applied once you leave build mode."
2121
end
22+
23+
local canuse, reason = hook.Run( "CLoadoutCanGiveWeapons", ply )
2224

23-
if hook.Run( "CLoadoutCanGiveWeapons", ply ) == false then
24-
return false
25+
if canuse == false then
26+
return false, reason
2527
end
2628

2729
return true

0 commit comments

Comments
 (0)