27.01.2016, 09:17
It's too simple. I will give u an example with a colorful/multiple color message!
On player connect
On player disconnect
On player connect
Code:
public OnPlayerConnect(playerid)
{
new pname[MAX_PLAYER_NAME], string[100 + MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(string, sizeof(string), "{FF6600}%s{66FF00} has joined the server! {00FFFF}[Joined]", pname);
SendClientMessageToAll(0x00ff33FF, string);
return 1;
}
Code:
public OnPlayerDisconnect(playerid, reason)
{
new pname[MAX_PLAYER_NAME], string[100 + MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
switch(reason)
{
case 0: format(string, sizeof(string), "{FF6600}%s{FF0000} has left the server. {00FFFF}[Timeout]", pname);
case 1: format(string, sizeof(string), "{FF6600}%s{FF0000} has left the server. {00FFFF}[Leaving]", pname);
case 2: format(string, sizeof(string), "{FF6600}%s{FF0000} has left the server. {00FFFF}[Kicked/Banned]", pname);
}
SendClientMessageToAll(0xff0000FF, string);
return 1;
}

