SHARE
TWEET

Untitled

a guest Oct 21st, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function checkBiz(player)
  2.     outputChatBox("testcheck")
  3.     local dbid = tonumber(getElementData(player, "dbid"))
  4.     for key, value in ipairs(getElementsByType("interior")) do
  5.         local interiorStatus = getElementData(value, "status")
  6.         local owner = tonumber( interiorStatus[4] )
  7.         local inttype = interiorStatus[1]
  8.         local intprice = interiorStatus[5]
  9.         if (owner) and (owner == dbid) then -- vai int īpašnieka id sakrīt ar tavu dbid
  10.             if inttype == 1 then -- vai interjēra tips == bizness
  11.                 if exports["interior-system"]:isActive(value) then -- vai interjērs ir aktīvs
  12.                     local profit = getElementData(player, "businessprofit")
  13.                     local inttax = exports.payday:getPropertyTaxRate()
  14.                     local payout = (intprice /100) / 0.5
  15.                     return math.round(payout)
  16.                 else -- Ja nav aktīvs
  17.                     outputChatBox("Jūs nesaņēmāt valsts pabalstu uzņēmējiem jo jūsu interjērs ir neaktīvs",player)
  18.                     return 0
  19.                 end
  20.             end
  21.         end
  22.     end
  23. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top