public OnPlayerConnect(playerid) { new pName[24],PIP[16],String[128]; GetPlayerName(playerid, pName, sizeof(pName)); GetPlayerIp(playerid,PIP, sizeof(PIP)); format(string, sizeof(string),"%s has joined the server ip: (%s)",pName,PIP) for (new i = 0; i < MAX_SERVER_PLAYERS; i++) { if(IsPlayerAdmin(i)) SendClientMessage(i, 0xDEEE20FF, string); } return 1; }
Код:
public OnPlayerConnect(playerid) { new pName[24],PIP[16],String[128]; GetPlayerName(playerid, pName, sizeof(pName)); GetPlayerIp(playerid,PIP, sizeof(PIP)); format(string, sizeof(string),"%s has joined the server ip: (%s)",pName,PIP) for (new i = 0; i < MAX_SERVER_PLAYERS; i++) { if(IsPlayerAdmin(i)) SendClientMessage(i, 0xDEEE20FF, string); } return 1; } |
//==============================================================================
// Connect Messages
//==============================================================================
if(ServerInfo[ConnectMessages] == 1)
{
new pAKA[256];
pAKA = dini_Get("LuxAdmin/Config/aka.txt",tmp3);
if (strlen(pAKA) < 3)
format(str,sizeof(str),"* Player %s (Id:%d) has joined the server", PlayerName,playerid);
else if (!strcmp(pAKA,PlayerName,true))
format(str,sizeof(str),"* Player %s (Id:%d) has joined the server", PlayerName,playerid);
else format(str,sizeof(str),"Player %s (Id:%d) has joined the server (Aka: %s)",PlayerName,playerid,pAKA);
for(new i = 0; i < MAX_PLAYERS; i++)
if(IsPlayerConnected(i) && playerid != i)
{
if(IsPlayerAdmin(i))
SendClientMessage(i,grey,str);
else
{
format(string,sizeof(string),"* Player %s (Id:%d) has joined the server", PlayerName, playerid);
SendClientMessage(i,grey,string);
}
}
}
// Put is In OnPlayerConnect:
new
istr[100],
Nome[24],
ip[16]
;
GetPlayerName(playerid, Nome, 24); GetPlayerIp(playerid, ip, 16).
format(istr, sizeof(istr),"%s(%i), has joined the server IP: %s", Nome, playerid, ip);
for(new i, e = GetMaxPlayers(); i != e; ++i)
{
if(IsPlayerConnected(i) && IsPlayerAdmin(i))
{
SendClientMessage(playerid, -1, istr);
}
}
public OnPlayerConnect(playerid) { new pName[24],PIP[16],String[128]; GetPlayerName(playerid, pName, sizeof(pName)); GetPlayerIp(playerid,PIP, sizeof(PIP)); format(string, sizeof(string),"%s has joined the server ip: (%s)",pName,PIP); for (new i = 0; i < MAX_SERVER_PLAYERS; i++) { if(IsPlayerAdmin(i)) SendClientMessage(i, 0xDEEE20FF, string); } return 1; }