Share Pastebin
Guest
Public paste!

MaRcOsWeB

By: a guest | Sep 19th, 2008 | Syntax: C++ | Size: 1.73 KB | Hits: 9 | Expires: Never
Copy text to clipboard
  1. //----------------------------------------------------------------------------//
  2. #include <a_samp>
  3. //----------------------------------------------------------------------------//
  4. #if defined FILTERSCRIPT
  5. #define GRIS 0xAFAFAFAA
  6. //----------------------------------------------------------------------------//
  7. public OnFilterScriptInit()
  8. {
  9.         print("\n--------------------------------------");
  10.         print(" [TUTORIAL]Mensajes de estado (al entrar y salir)");
  11.         print("--------------------------------------\n");
  12.         return 1;
  13. }
  14. //----------------------------------------------------------------------------//
  15. public OnFilterScriptExit()
  16. {
  17.         return 1;
  18. }
  19. //----------------------------------------------------------------------------//
  20. #else
  21. //----------------------------------------------------------------------------//
  22. main()
  23. {
  24.         print("\n----------------------------------");
  25.         print(" [TUTORIAL]Mensajes de estado (al entrar y salir)");
  26.         print("----------------------------------\n");
  27. }
  28. //----------------------------------------------------------------------------//
  29. #endif
  30. //----------------------------------------------------------------------------//
  31. public OnPlayerConnect(playerid) {
  32.    new string[256];
  33.    new JugadorN[MAX_PLAYER_NAME];
  34.    format(string, sizeof(string), "%s Se ha conectado al servidor",JugadorN);
  35.    SendClientMessageToAll(GRIS,string);
  36.    return 1; }
  37. //----------------------------------------------------------------------------//
  38. public OnPlayerDisconnect(playerid, reason){
  39.    new string[256];
  40.    new Jnombre[MAX_PLAYER_NAME];
  41.    GetPlayerName(playerid,Jnombre,256);
  42.    format(string, sizeof(string), "%s Se ha desconectado del servidor",Jnombre);
  43.    SendClientMessageToAll(GRIS,string);
  44.    return 1;}