Jump to content

Problem setplayermoney For A group


HustraDev

Recommended Posts

  
setTimer(function() 
for k,tPlayer in ipairs(getElementsByType("player")) do  
if getElementData(tPlayer,'Group') == 'Army' then 
   outputChatBox("Data: "..getElementData(tPlayer, 'Group')) 
   givePlayerMoney(tPlayer, 4000) --- money Army 
   end 
end 
end, 60000, 0) 
  
Edited by Guest
Link to comment
All Wrong .. :

setTimer ( function (  ) 
  for _,players in ipairs ( getElementsByType( "player" ) ) do 
    if ( getElementData ( players, "Group" ) == "Army" ) then 
           givePlayerMoney ( players, 4000 ) 
     end 
  end 
end, 60000, 0 ) 

There's nothing wrong in my code. If there is something wrong it will output it. I din't see givePlayerMoney function so :~.

My code has nothing wrong .. Please try to improve english -.-

Link to comment
All Wrong .. :

setTimer ( function (  ) 
  for _,players in ipairs ( getElementsByType( "player" ) ) do 
    if ( getElementData ( players, "Group" ) == "Army" ) then 
           givePlayerMoney ( players, 4000 ) 
     end 
  end 
end, 60000, 0 ) 

There's nothing wrong in my code. If there is something wrong it will output it. I din't see givePlayerMoney function so :~.

My code has nothing wrong .. Please try to improve english -.-

oh Nice :lol::lol:

u must use .. givePlayerMoney ... not setPlayerMoney

and he say : " every 1 hour" .. your code the timer is 1 just .

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