How can I see the players that are in a world?

Started by Kid_Buu, Dec 28, 2017, 06:25 AM

Previous topic - Next topic

Kid_Buu

Hello I wanted to request a system or something similar to see the users that are for example: in the world 1,2,3, etc.

Thank you for your attention :D

umar4911

Quote from: Kid_Buu on Dec 28, 2017, 06:25 AMHello I wanted to request a system or something similar to see the users that are for example: in the world 1,2,3, etc.

Thank you for your attention :D
if the players radar is on in the specific world and you are in that world too, you will be able to see him.
I am gamer, programmer and hacker. Try to find me!
xD

Kid_Buu

is that I want to see the number of players that are in the world with a command

Mohamed Boubekri

#3
Quote from: Kid_Buu on Dec 28, 2017, 05:00 PMis that I want to see the number of players that are in the world with a command
I Think You Need it:-( UnTested )
else if ( cmd == "world" )
{
if ( !text ) MessagePlayer("[#ff0000][INFO][#ffffff] /world <Player>",player);
local plr = FindPlayer(text);
if(!plr) MessagePlayer("[#FF0000]Usage Error:[#FFFFFF] Unknown Player", player);
else
{
MessagePlayer("[#00ffff][INFO][#ffffff] World " + plr.Name + " is "+plr.World+".",player );
}
}
| What now ? | Not yet ! |
Morrocan:- [ 🇲🇦 ].

umar4911

try this, working
else if(cmd == "inworld")
{
if(!text) MessagePlayer("Error - Use /"+cmd+" [world id]", player);
else if(!IsNum(text)) MessagePlayer("Error - ID should be in number", player);
else
{
local v = 0;
for(local i=0; i <= GetMaxPlayers(); i++)
{
local plr = FindPlayer(i);
if(plr && plr.World == text.tointeger())
{
v = v+1;
MessagePlayer("Player : "+plr.Name, player)
}
}
if(v == 0) MessagePlayer("No one was in the world : "+text+".", player);
else MessagePlayer("Total player is World : "+text+" are : "+v+".", player);
}
}
I am gamer, programmer and hacker. Try to find me!
xD