Bananovy Posted December 30, 2014 Share Posted December 30, 2014 Hello there, I was looking for functions for create second place counting. With first place was easier, but I can't figure out how can I make 2nd places in DD. Any ideas what should I use? Link to comment
Blinker. Posted December 30, 2014 Share Posted December 30, 2014 addEventHandler("onPlayerWasted",root, function() if (#getAlivePlayers == 1) then outputChatBox(getPlayerName(source).." 2nd") end end) Link to comment
Bananovy Posted December 30, 2014 Author Share Posted December 30, 2014 addEventHandler("onPlayerWasted",root, function() if (#getAlivePlayers == 1) then outputChatBox(getPlayerName(source).." 2nd") end end) Attempt to get length of global 'getAlivePlayers' (a function value) Edit: Used like that: local aPlayer = getAlivePlayers ( ) if (#aPlayer == 1) then outputChatBox(getPlayerName(source).." 2nd") end and works Thank you 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