28.10.2014, 06:54
You have two alternatives here.
Send the message to everyone EXCEPT the player joining:
or
Send extra lines to the player to 'hide' the join message:
Note that it is actually more efficient to add 100 lines of 'SendClientMessage' rather than using it in a loop. But who wants to do that, right?
Those are your two options, choose your preference.
Send the message to everyone EXCEPT the player joining:
pawn Код:
new name[MAX_PLAYER_NAME], string[85];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "{FF0000}[SERVER]{FFFFFF}: {CCCCCC}%s {FFFFFF}has joined LSCNR", name);
for(new i = 0; i < MAX_PLAYERS; i++) //I would recommend using foreach instead.
{
if(!IsPlayerConnected(i)) continue; //Remove this if you use foreach.
if(i == playerid) continue;
SendClientMessage(i, 0xFFFFFFF, string);
}
SendClientMessage(playerid, -1, "Welcome to LSCNR {0066CC}cops {FFFFFF}and {FF0000}robbers");
SendClientMessage(playerid, -1, "-------------------------------------------------------------");
SendClientMessage(playerid, -1, "Please read {FF0000}(/rules, /help, /commands) {FFFFFF}before you play");
Send extra lines to the player to 'hide' the join message:
pawn Код:
new name[MAX_PLAYER_NAME], string[85];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "{FF0000}[SERVER]{FFFFFF}: {CCCCCC}%s {FFFFFF}has joined LSCNR", name);
SendClientMessageToAll(0xFFFFFFFF, string);
for(new i = 0; i < 100; i++) SendClientMessage(playerid, -1, " ");
SendClientMessage(playerid, -1, "Welcome to LSCNR {0066CC}cops {FFFFFF}and {FF0000}robbers");
SendClientMessage(playerid, -1, "-------------------------------------------------------------");
SendClientMessage(playerid, -1, "Please read {FF0000}(/rules, /help, /commands) {FFFFFF}before you play");
Those are your two options, choose your preference.

