Jump to content

Police Paycheck


Gtagasje

Recommended Posts

I have made a givemoney script for all players, but I wan't it to only give the team police paycheck.

I don't know how to do this..

This is what I have:

  
function allPlayersPayDay() 
  local allPlayers = getElementsByType("player") 
  for index,value in ipairs(allPlayers) do 
    givePlayerMoney ( value, 5000 ) 
    outputChatBox ( "PayTime! You have been given 5K! Enjoy!", value ) 
  end 
end 
  
function onResourceStart(thisResource) 
  setTimer ( allPlayersPayDay, 1000, 0 ) 
end 
addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), onResourceStart ) 
  

Btw, the time is just for testing.

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