Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function checkBiz(player)
- outputChatBox("testcheck")
- local dbid = tonumber(getElementData(player, "dbid"))
- for key, value in ipairs(getElementsByType("interior")) do
- local interiorStatus = getElementData(value, "status")
- local owner = tonumber( interiorStatus[4] )
- local inttype = interiorStatus[1]
- local intprice = interiorStatus[5]
- if (owner) and (owner == dbid) then -- vai int īpašnieka id sakrīt ar tavu dbid
- if inttype == 1 then -- vai interjēra tips == bizness
- if exports["interior-system"]:isActive(value) then -- vai interjērs ir aktīvs
- local profit = getElementData(player, "businessprofit")
- local inttax = exports.payday:getPropertyTaxRate()
- local payout = (intprice /100) / 0.5
- return math.round(payout)
- else -- Ja nav aktīvs
- outputChatBox("Jūs nesaņēmāt valsts pabalstu uzņēmējiem jo jūsu interjērs ir neaktīvs",player)
- return 0
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement