SHARE
TWEET

Connectou/Desconnectou

a guest Mar 15th, 2012 152 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <a_samp>
  2. #include <Logs>
  3. #define TXT_Connectou "[Server]{00B9FF}O Player {FFFF00}%s{00B9FF} (id: {FFFF00}%i{00B9FF}) Entrou No Servidor."
  4. #define TXT_Desconectou "[Server]{00B9FF}O Player {FFFF00}%s{00B9FF} (id: {FFFF00}%i{00B9FF}) Saiu Do Servidor."
  5. public OnFilterScriptInit()
  6. {
  7.     print("\n'- Don_Speed -'\n");
  8.     return 1;
  9. }
  10. public OnFilterScriptExit()
  11. {
  12.     return 1;
  13. }
  14. main()
  15. {
  16.     print("\n'- Don_Speed -'\n");
  17. }
  18. public OnPlayerConnect(playerid)
  19. {
  20.     new Name[MAX_PLAYER_NAME], NewPlayerMsg[125], celulas[100];
  21.     format(NewPlayerMsg, 128, TXT_Connectou, Name, playerid);
  22.     SendClientMessageToAll( -1, NewPlayerMsg);
  23.     if(!LogExistir("Entrou.log"))
  24.     {
  25.         CriarLog("Entrou.log");
  26.         format(celulas, sizeof(celulas), "[Server]{00B9FF}O Player {FFFF00}%s{00B9FF} (id: {FFFF00}%i{00B9FF}) Entrou No Servidor.",Name, playerid);
  27.         EscreverLog("Entrou.log", celulas);
  28.         return 1;
  29.     }
  30.     return 0;
  31. }
  32.  
  33. public OnPlayerDisconnect(playerid, reason)
  34. {
  35.     new Name[MAX_PLAYER_NAME], Msg[125], celulas[100];
  36.     format(Msg, 128, TXT_Desconectou, Name, playerid);
  37.     SendClientMessageToAll( -1, Msg);
  38.     if(!LogExistir("Saiu.log"))
  39.     {
  40.         CriarLog("Saiu.log");
  41.         format(celulas, sizeof(celulas), "[Server]{00B9FF}O Player {FFFF00}%s{00B9FF} (id: {FFFF00}%i{00B9FF}) Saiu Do Servidor.",Name, playerid);
  42.         EscreverLog("Saiu.log", celulas);
  43.         return 1;
  44.     }
  45.     return 1;
  46. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top