Skip to content

Commit

Permalink
Add vendor buy net validation (#426)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikolay0701 authored May 16, 2024
1 parent 5bbfad4 commit 27647e2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plugins/vendor/sh_plugin.lua
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,10 @@ if (SERVER) then
return client:NotifyLocalized("canNotAfford")
end

if !entity:CanSellToPlayer(client, uniqueID) then
return false
end

local name = L(ix.item.list[uniqueID].name, client)

client:GetCharacter():TakeMoney(price, price == 0)
Expand Down

0 comments on commit 27647e2

Please sign in to comment.