03.12.2014, 12:26
Hey boys i created a command /factions with online faction members but when i use it and i invite my self to a faction and i do /factions it shows me like all factions have 1 player but i am only online.
Codes
Codes
PHP код:
COMMAND:factions(playerid, params[])
{
new string[90],count=0;
for(new i=0;i<MAX_PLAYERS;i++)
{
if(PlayerInfo[i][playerteam] == COPS) count++;
}
format(string, sizeof(string), "Los Santos Police Department:Members [%d/45]", count);
SendClientMessage(playerid, -1, string);
for(new i=0;i<MAX_PLAYERS;i++)
{
if(PlayerInfo[i][playerteam] == FBI) count++;
}
format(string, sizeof(string), "FBI Online Members:[%d/45]",count);
SendClientMessage(playerid, -1, string);
for(new i=0;i<MAX_PLAYERS;i++)
{
if(PlayerInfo[i][playerteam] == CORLEONE) count++;
}
format(string, sizeof(string), "Corleone Online Members:[%d/45]",count);
SendClientMessage(playerid, -1, string);