Jump to content

Pay only for workers


MatXpl

Recommended Posts

Hi!

I have script 'Pay Day'

And i wont make this script only to acl group "workers"

pls help!

Script code:

function allPlayersPayDay() 
  local allPlayers = getElementsByType("player") 
  for index,value in ipairs(allPlayers) do  
    givePlayerMoney ( value, 1000 )  
    outputChatBox ( "You have 1000$ !", value ) 
  end 
end 
  
function onResourceStart(thisResource) 
  setTimer ( allPlayersPayDay, 3600000, 0 ) 
end 
addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), onResourceStart ) 
  

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