public OnPlayerDisconnect(playerid, reason)
{
new pname[MAX_PLAYER_NAME], string[39 + MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
switch(reason)
{
case 0: format(string, sizeof(string), "%s has left the server. (Lost Connection)", pname);
case 1: format(string, sizeof(string), "%s has left the server. (Leaving)", pname);
case 2: format(string, sizeof(string), "%s has left the server. (Kicked)", pname);
}
SendClientMessageToAll(0xAAAAAAAA, string);
Inbus[playerid] = 0;
return 1;
}
public OnPlayerConnect(playerid)
{
new pname[MAX_PLAYER_NAME], string[22 + MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(string, sizeof(string), "%s has joined the server", pname);
SendClientMessageToAll(0xAAAAAAAA, string);
Inbus[playerid] = 0;
return 1;
}