17.10.2013, 02:21
Код:
new name[MAX_PLAYER_NAME]; new j_msg[20 + MAX_PLAYER_NAME]; GetPlayerName(playerid, name,sizeof (name)); format(j_msg,sizeof (j_msg),"%s has joined server",name); SCMA(0x808080AA, j_msg);
new name[MAX_PLAYER_NAME]; new j_msg[20 + MAX_PLAYER_NAME]; GetPlayerName(playerid, name,sizeof (name)); format(j_msg,sizeof (j_msg),"%s has joined server",name); SCMA(0x808080AA, j_msg);
for(new a; a < MAX_PLAYERS; ++a)
{
if(IsPlayerConnected(a) && a != playerid) // if 'a' is connected and not playerid
SendClientMessage(a,0x808080AA,j_msg);
}
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
new str[40], strname[1+MAX_PLAYER_NAME+1];
GetPlayerName(playerid, strname, sizeof(strname));
format(str,sizeof(str),"[Connect]: %s Has connected to the server", strname);
SendClientMessage(i, -1, str);
}
}
pawn Код:
|