14.07.2015, 11:02
How can I make them look all the players in place?
PHP код:
if(strcmp(cmd, "/alias", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 1)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_SERVER, "Foloseste: {FFFFFF}/alias [playerid]");
return 1;
}
giveplayerid = ReturnUser(tmp);
new playerip[36], playersip[36], count;
GetPlayerIp(giveplayerid, playerip, sizeof(playerip));
if(IsPlayerConnected(giveplayerid))
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
GetPlayerIp(i, playersip, sizeof(playersip));
if(!strcmp(playerip, playersip))
{
GetPlayerName(i, sendername, sizeof(sendername));
format(string, 256, "Conturi online %s: %s", GetName(playerid), sendername);
count ++;
}
}
}
if(count == 1) return SCM(playerid, -1, "Acest player nu are mai multe conturi online!");
SCM(playerid, COLOR_WHITE, string);
return 1;
}
}
}
return 1;
}