Gtagasje Posted October 16, 2011 Share Posted October 16, 2011 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
BriGhtx3 Posted October 16, 2011 Share Posted October 16, 2011 local allPlayers = getPlayersInTeam ( theteam ) Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now