sss


terça-feira, 11 de outubro de 2011

[Filescript] Mostrar quem entra e quem sai do servidor


pawn Code:

#define Cor_Azul    0x00C8FFFF

public OnPlayerConnect(playerid)
{
  new string[128];
  new pName[MAX_PLAYER_NAME];
  GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
  format(string,sizeof string,"%s entrou no servidor!",pName);
  SendClientMessageToAll(Cor_Azul,string);

    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_Azul,string);
    return 1;
}

0 comentários:

Postar um comentário

 
Design by Wordpress Theme | Bloggerized by Free Blogger Templates | coupon codes