script_name("Salary")
script_authors("hijuce", "mark)","Furlex")
script_version("0.3.1")
local sampev = require 'lib.samp.events'
local encoding = require 'encoding'
encoding.default = 'CP1251'
text = renderCreateFont('Arial', 10, 11)
salary = renderCreateFont('Arial Narrow', 20, 5)
balance = 0
newbalance = 0
function main()
while not isSampAvailable() do wait(0) end
userscreenX, userscreenY = getScreenResolution()
while true do
if sampIsLocalPlayerSpawned() then
oldMoney = getPlayerMoney(Player)
while true do
if oldMoney < getPlayerMoney(Player) then
newbalance = getPlayerMoney(Player) - oldMoney
elseif oldMoney > getPlayerMoney(Player) then
newbalance = -oldMoney + getPlayerMoney(Player)
end
renderDrawBox(userscreenX - userscreenX + 15, userscreenY / 2, 200, 40, 0x3300FFFF)
renderDrawBox(userscreenX - userscreenX + 15, userscreenY / 2, 200, 80, 0x885D5D5D)
renderFontDrawText(text, "Заработок за сессию", userscreenX - userscreenX + 35, userscreenY / 1.95, 0xFFFFFFFF)
renderFontDrawText(salary, newbalance + 0, userscreenX - userscreenX + 35, userscreenY / 1.85, 0xFF33DEAD)
wait(0)
end
end
wait(0)
end
end