IgorLuiz

IGConect

Jul 22nd, 2015
404
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //////////////////////////////////////////////////////////////////////////////| By: Igor Luiz| /////////////////////////////////////////////////////////
  2. #include <a_samp>
  3.  
  4. #if defined FILTERSCRIPT
  5.  
  6. public OnFilterScriptInit()
  7. {
  8.     print("\n--------------------------------------");
  9.     print("|FS| IG Ligado");
  10.     print("--------------------------------------\n");
  11.     return 1;
  12. }
  13.  
  14. #else
  15.  
  16. main()
  17. {
  18.     print("\n----------------------------------");
  19.     print("|FS| IG Ligado");
  20.     print("----------------------------------\n");
  21. }
  22.  
  23. new
  24.    Text:ConectDesconect,
  25.    Info[100]
  26. ;
  27. #endif
  28. public OnGameModeInit()
  29. {
  30.     ConectDesconect = TextDrawCreate(21.000000,161.000000, "_");
  31.     TextDrawAlignment(ConectDesconect,0);
  32.     TextDrawBackgroundColor(ConectDesconect,0x000000ff);
  33.     TextDrawFont(ConectDesconect,1);
  34.     TextDrawLetterSize(ConectDesconect,0.199999,1.200000);
  35.     TextDrawColor(ConectDesconect,0xffffffff);
  36.     TextDrawSetOutline(ConectDesconect,1);
  37.     TextDrawSetProportional(ConectDesconect,1);
  38.     return 1;
  39. }
  40.  
  41. public OnPlayerConnect(playerid)
  42. {
  43.     TextDrawHideForAll(ConectDesconect);
  44.     format(Info, sizeof(Info), "~w~o jogador ~g~%s [ID:%i] ~w~esta ~g~conectado.", Nome(playerid), playerid);
  45.     TextDrawSetString(ConectDesconect, Info);
  46.     TextDrawShowForAll(ConectDesconect);
  47.     SetTimer("Destruir", 8000, true);
  48.     return 1;
  49. }
  50.  
  51. public OnPlayerDisconnect(playerid, reason)
  52. {
  53.     TextDrawHideForAll(ConectDesconect);
  54.     format(Info, sizeof(Info), "~w~o jogador ~r~%s [ID:%i ~w~esta ~r~desconectado.", Nome(playerid), playerid);
  55.     TextDrawSetString(ConectDesconect, Info);
  56.     TextDrawShowForAll(ConectDesconect);
  57.     SetTimer("Destruir", 8000, true);
  58.     return 1;
  59. }
  60.  
  61. forward Destruir();
  62. public Destruir()
  63. {
  64.     TextDrawHideForAll(ConectDesconect);
  65. }
  66.  
  67. stock Nome(playerid)
  68. {
  69.     new nome[MAX_PLAYER_NAME];
  70.     GetPlayerName(playerid, nome, sizeof( nome ));
  71.     return nome;
  72. }
  73. //////////////////////////////////////////////////////////////////////////////| By: Igor Luiz| /////////////////////////////////////////////////////////
Advertisement
Add Comment
Please, Sign In to add comment