Snoozy Posted May 28, 2011 Share Posted May 28, 2011 Is there a way to set like a timer clientside and then in the function that the timer directs to make it loop through all players? Link to comment
karlis Posted May 28, 2011 Share Posted May 28, 2011 just better do this addEventHandler("onClientResourceStart",getResourceRootElement(),function() players=getElementsByType("player") setTimer(function() for k,v in ipairs(players) do --do what u want end end,put_your_time_here,0) end) addEventHandler("onClientPlayerJoin",getRootElement(),function() players[#players+1]=source end) addEventHandler("onClientPlayerQuit",getRootElement(),function() for k,p in ipairs(players) do if source==p then table.remove(players,k) end end end) 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