Jump to content

question


Recommended Posts

This is how i would script it:

client:

amount = 0 
function text() 
    dxDrawText(amount, 0, 0, 1000, 1000) 
end 
  
t = {} 
addEvent("onPlayerGetMoney", true) 
addEventHandler("onPlayerGetMoney", root, 
    function (a) 
        if (a) then  
            addEventHandler("onClientRender", root, text) 
            amount = a 
            t[localPlayer] = setTimer( 
                function () 
                    amount = 0 
                    removeEventHandler("onClientRender", root, text) 
                end, 5000, 1 
            ) 
        end 
    end 
) 

server:

addCommandHandler("money",  
    function (p) 
        givePlayerMoney(p,1000) 
        triggerClientEvent(p,"onPlayerGetMoney",p,1000) 
    end 
) 

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...