05.03.2018, 21:04
PHP код:
dcmd_facplayers(playerid, params[])
{
new playersCMD, playersLLL, players3CP, playersMLC;
for(new i = 0; i < MAX_PLAYERS; i ++)
{
if(IsPlayerConnected(i) && PlayerInfo[i][pFaccoes] == 1 || PlayerInfo[i][pFaccoes] == 2 || PlayerInfo[i][pFaccoes] == 3)
{playersCMD ++;}
if(IsPlayerConnected(i) && PlayerInfo[i][pFaccoes] == 4 || PlayerInfo[i][pFaccoes] == 5 || PlayerInfo[i][pFaccoes] == 6)
{playersLLL ++;}
if(IsPlayerConnected(i) && PlayerInfo[i][pFaccoes] == 7 || PlayerInfo[i][pFaccoes] == 8 || PlayerInfo[i][pFaccoes] == 9)
{players3CP ++;}
if(IsPlayerConnected(i) && PlayerInfo[i][pFaccoes] == 10 || PlayerInfo[i][pFaccoes] == 11 || PlayerInfo[i][pFaccoes] == 12)
{playersMLC ++;}
}
new STring[4000], string1[4000];
format(STring, -1, "CMD» %d players online.", playersCMD);
strcat(string1,STring);
format(STring, -1, "LLL» %d players online.", playersLLL);
strcat(string1,STring);
format(STring, -1, "TD3» %d players online.", players3CP);
strcat(string1,STring);
format(STring, -1, "MLC» %d players online.", playersMLC);
strcat(string1,STring);
ShowPlayerDialog(playerid, 666 , DIALOG_STYLE_MSGBOX, "Todas facзхes do servidor", string1, "OK", "");
return 1;
}