29.07.2018, 03:03
what i would do is make a loop through all the players and them make a function which collects the players information that i want to be displayed and send it in the command, in other words somthing like a /admins command with a little more features.
Note that if you use the function "Sendinfo" you will have to create/define it because i didn't make or if you are too lazy to make the function you will have to paste the long code to collect the information in the format line.
Now all you need to do is build the function which is pretty easy to do
PHP Code:
CMD:admins(playerid)
{
new count = 0;
SendClientMessage(playerid, 0x3776CCFF, " Players Information");
foreach(new i : Player)
{
string[128];
format(string, sizeof(string), "%s ", Sendinfo(i));// you will need to edit this line if you dont want to make a function to collect the information and just rather to paste the long code here.
SendClientMessage(playerid,-1,string)
count ++;
}
if(count <= 1)
{
SendClientMessage(playerid,-1,"No Players Online");
}
return 1;
}
Now all you need to do is build the function which is pretty easy to do