Jump to content

Dayz shop system money


Manic69

Recommended Posts

Hello .

I have this Dayz shop:https://community.multitheftauto.com/index.php?p=resources&s=details&id=10869

And this money:

savemoney

addEventHandler("onPlayerLogin", getRootElement(),
function()
    local account = getPlayerAccount(source)
    if account then
        local money = getAccountData(account, "stats.money")
        setPlayerMoney(source, money)
    else
        outputChatBox("You are not login ! (/login)", source, 250, 0, 0, true)
    end
end)
addEventHandler("onPlayerQuit", getRootElement(),
function()
    local account = getPlayerAccount(source)
    if account then
        local cash = getPlayerMoney(source)
        setAccountData(account, "stats.money", cash)
    else
        outputChatBox("You are not login ! (/login)", source, 250, 0, 0, true)
    end
end)

showdolars

addEventHandler("onClientResourceStart", resourceRoot,
    function()    
    end
)
addEventHandler("onClientRender", root,
    function()
        local cash = getPlayerMoney( getLocalPlayer() )
        dxDrawText("Money",   855,   22,  688, 128, tocolor(150, 247, 7, 255), 0.50, "bankgothic", "left", "top", false, false, false, false, false)
        dxDrawText(""..cash,  920,22,796,123, tocolor(255, 255, 255, 255), 0.50, "bankgothic", "left", "top", false, false, false, false, false)
    end
)

zombiekill

addEventHandler( "onZombieGetsKilled", getRootElement(),
    function( killer )
        givePlayerMoney( killer, 10 );
    end
)
 

Meta

<meta>
    <info author="Name" type="script" name="Moneyhud" version="1.4.0"/>
    <script src="showdolars.lua" type="client" />
        <script src="zombiekill.lua" />
        <script src="savemoney.lua" />
</meta>

 

But do not go together

pls somebody can help me ?

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...