GetPersonList
From Spheriki
Gets the names of all persons and returns them in an array.
Contents |
[edit]
Usage
Array GetPersonList();
- Array of strings is returned, containing the names of persons on the current map, as well as persistent persons.
[edit]
Examples
This code snippet will do something if there are exactly five people on the map.
var people = GetPersonList();
if (people.length == 5) {
// There are 5 people on the map
}
The following lines demonstrate how the names can be obtained individually.
var people = GetPersonList();
if (people.length > 0) {
var px = GetPersonX(people[0]);
// etc.
}
[edit]
Notes
- Names may not be unique. If two persons have the same name, that name will show up twice in the array.
[edit]

