20/08/2021 05:19
Fiz usando a função IsAndroidPlayer(playerid); da biblioteca "YSI Includes"
Código:
CMD:online(playerid, params[])
{
if(IsPlayerAdmin(playerid))
{
new string[144];
format(string, sizeof(string), "| INFO | {FFFFFF}%03d Jogadores de %04d slots!", GetPlayers(), GetMaxPlayers());
SendClientMessage(playerid, 0xFF5A00FF, string);
format(string, sizeof(string), "| INFO | {FFFFFF}Jogadores Android: {FF0000}%03d", GetSVarInt("Android:On"));
SendClientMessage(playerid, 0xFF5A00FF, string);
format(string, sizeof(string), "| INFO | {FFFFFF}Jogadores Desktop: {FF0000}%03d", GetSVarInt("Desktop:On"));
SendClientMessage(playerid, 0xFF5A00FF, string);
}
else SendClientMessage(playerid, 0xFF0000FF, "| ERRO | Voce nao esta logado no RCON");
return 1;
}
stock GetPlayers()
{
new players;
foreach(new id : Player)
{
players++;
if(IsAndroidPlayer(id))
{
new mobile = GetSVarInt("Android:On");
SetSVarInt("Android:On", (mobile + 1));
}
else
{
new desktop = GetSVarInt("Desktop:On");
SetSVarInt("Desktop:On", (desktop + 1));
}
}
return players;
}