Jump to content

script error give money bad argument


battle309

Recommended Posts

function kay () 
      setTimer( givePlayerMoney, 300000, 1, source, 100) 
end 
addEventHandler ("onPlayerSpawn", root, kay) 

You don't have to declare the source argument, the first argument of that event is the x coordenate, which makes no sense.

source is the player that spawned.

Link to comment

lol, he said:

kill timer after i have reached $6000

try this:

setTimer(function() 
     for _,v in ipairs(getElementsByType("player"))do 
          if getPlayerMoney(v)< 6000 then 
               givePlayerMoney(v,100) 
          end 
     end 
end,300000,0) 

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