22.10.2011, 18:45
pawn Код:
if (strcmp(cmd, "/policias", true) == 0)
{
new polis;
SendClientMessage(playerid, COLOR_GRAD1, "Policias en Linea:");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))if(PlayerInfo[i][pMember] == 1 || PlayerInfo[i][pLeader] == 1)polis++;
}
if(polis >= 1)
{
new string[MAX_PLAYERS];
format(string, 256, " ** Polis: %d ** ",PoliciasP);//Si hay alguno conectado dira la cantidad de los q estan conectado
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
}
else
{
new string[MAX_PLAYERS];
format(string, 256, " ** Polis: Ninguno ** ");//Si no hay ninguno conectado
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
}
return 1;
}
EDIT: tenias un error que no corregi!
