[AYUDA] CMD Para ver Policias Conectados
#2

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;
}
Ahy deve funcionar perfecto!

EDIT: tenias un error que no corregi!
Reply


Messages In This Thread
[AYUDA] CMD Para ver Policias Conectados - by digman - 22.10.2011, 17:57
Respuesta: [AYUDA] CMD Para ver Policias Conectados - by Jovanny - 22.10.2011, 18:45

Forum Jump:


Users browsing this thread: 1 Guest(s)