Erm. I don't really understand that code (a little weird, sorry I have to call that)
Why..? You probably ask that.
It's because your checking if someone is an administrator, you are sending a message to all players
I made 2 versions for you, (which should work; on theory)
First version is the message, is sent to all players
pawn Код:
public OnPlayerConnect(playerid) {
new
pIP[17],
pName[24],
szStr[128];
GetPlayerName(playerid, pName, sizeof pName);
GetPlayerIp(playerid, pIP, sizeof pIP);
format(szStr, sizeof (szStr), "%s has joined the server. (IP: %s)", pName, pIP);
SendClientMessageToAll(-1, szStr);
return 1;
}
Second version is the message, is sent to all online RCON administrators.
pawn Код:
public OnPlayerConnect(playerid) {
new
pIP[17],
pName[24],
szStr[128];
GetPlayerName(playerid, pName, sizeof pName);
GetPlayerIp(playerid, pIP, sizeof pIP);
format(szStr, sizeof (szStr), "%s has joined the server. (IP: %s)", pName, pIP);
for (new i, j = GetMaxPlayers(); i < j; ++ i) {
if (!IsPlayerConnected(i))
continue;
if (IsPlayerAdmin(i)) {
SendClientMessage(i, -1, szStr);
}
}
return 1;
}
Sorry if it didn't helped..