Jump to content

what is the problem


top sniper

Recommended Posts

The setTimer don't give the element source...

Try that

  
addEventHandler("onPlayerJoin", getRootElement(), 
function() 
    setTimer(function(source) 
        if source then 
            givePlayerMoney(source, 1000) 
        end 
    end, 80000, 1, source) 
end) 
  

Edit: If you want give a cash for the player every 80000ms, you change the frequence value

  
addEventHandler("onPlayerJoin", getRootElement(), 
function() 
    setTimer(function(source) 
        if source then 
            givePlayerMoney(source, 1000) 
        end 
    end, 80000, 0, source) 
end) 
  

Link to comment
The setTimer don't give the element source...

Try that

  
addEventHandler("onPlayerJoin", getRootElement(), 
function() 
    setTimer(function(source) 
        if source then 
            givePlayerMoney(source, 1000) 
        end 
    end, 80000, 1, source) 
end) 
  

Edit: If you want give a cash for the player every 80000ms, you change the frequence value

  
addEventHandler("onPlayerJoin", getRootElement(), 
function() 
    setTimer(function(source) 
        if source then 
            givePlayerMoney(source, 1000) 
        end 
    end, 80000, 0, source) 
end) 
  

thanks for helping me :D

i will try it now :P

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