Jump to content

Function for Count


Recommended Posts

Posted

What is the code for counting number of players in a zone, and what is the difference between these?

math.count (##...##)

local count = math.count(1,2,3,4,5,6) assert(count == 6) 

and

string.count

int string.count(string text, string search) 

One thing I understood about string.count is it is an option to search and count "[ ]-Alphabet" to get no. of alphabets in text "[ ]-Text".

Posted

You don't need these functions for what you wanna do

loop all the players and check if they are inside your area (whatever is your area colship or marker)

to get all the players use

getElementsByType 

Posted
You don't need these functions for what you wanna do

loop all the players and check if they are inside your area (whatever is your area colship or marker)

to get all the players use

getElementsByType 

Close this Topic, problem Solved by myself lol. Anyways thank you ALw7sH.

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