[RESOLVIDO]OnPlayerConnect,OnPlayerDisconnect
#3

Код:
public OnPlayerConnect(playerid)
{
  new PlayerName[MAX_PLAYER_NAME];
  new string[48];
  GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
  format(string, sizeof(string), "%s entrou no servidor.", PlayerName);
  return 1;
}
Код:
public OnPlayerDisconnect(playerid, reason)
{
  new PlayerName[MAX_PLAYER_NAME];
  new string[56];
  GetPlayerName(playerid, PlayerName, sizeof(PlayerName));

  switch(reason)
  {
    case 0: format(string, sizeof(string), "%s saiu do servidor. (Problema de conexгo)", PlayerName);
    case 1: format(string, sizeof(string), "%s saiu do servidor. (Conta prуpria)", PlayerName);
    case 2: format(string, sizeof(string), "%s saiu do servidor. (Kickado/Banido)", PlayerName);
  }
  SendClientMessageToAll(COR_AKI, string);
  return 1;
}
Reply


Messages In This Thread
[RESOLVIDO]OnPlayerConnect,OnPlayerDisconnect - by irffri1234 - 10.03.2010, 18:01
Re: [DUV]OnPlayerConnect,OnPlayerDisconnect - by Guilherme_Canani - 10.03.2010, 18:14
Re: [DUV]OnPlayerConnect,OnPlayerDisconnect - by Ambrуsio - 10.03.2010, 18:15
Re: [DUV]OnPlayerConnect,OnPlayerDisconnect - by irffri1234 - 10.03.2010, 18:16
Re: [RESOLVIDO]OnPlayerConnect,OnPlayerDisconnect - by andmeida10 - 10.03.2010, 18:21

Forum Jump:


Users browsing this thread: 1 Guest(s)