Guest User

Afk v3.0

a guest
Sep 5th, 2011
1,280
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.82 KB | None | 0 0
  1. //==============================================================================
  2. //SISTEM AFK v3.0 CRIADO POR MAU_TITO
  3. //VISITE MEU BLOG SUPORTE-TITO.BLOGSPOT.COM
  4. //MSN PARA CONTATO:[email protected]
  5. //==============================================================================
  6. #include <a_samp>
  7.  
  8. new Celula[128], Nome[24], bool:AFK[MAX_PLAYERS];
  9. new Cores[] =
  10. {
  11. 0x5EB7E3AA,
  12. 0xCD6CF6F6,
  13. 0x685000F6
  14. };
  15.  
  16. forward SendMensagens();
  17.  
  18. new Mensagens[2][256] =
  19. {
  20. "Atençao Comandos Afk /afk /sairafk /listafk.",
  21. "Sistema Afk v3.0 Criado Por mau_tito."
  22. };
  23. public OnFilterScriptInit()
  24. {
  25. print("\n--------------------------------------");
  26. print(" Ligando... ");
  27. print("FS AFK Criado Por Mau Tito Ligado.");
  28. print("--------------------------------------\n");
  29. return true;
  30. }
  31.  
  32. public OnFilterScriptExit()
  33. {
  34. print("\n--------------------------------------");
  35. print(" Desligando... ");
  36. print("FS AFK Criado Por Mau Tito.");
  37. print("--------------------------------------\n");
  38. return true;
  39. }
  40.  
  41. main()
  42. {
  43. print("\n----------------------------------");
  44. print("Criado Por Mau Tito.");
  45. print("FS AFK Criado Por Mau Tito.");
  46. print("----------------------------------\n");
  47. }
  48.  
  49. public OnPlayerCommandText(playerid, cmdtext[])
  50. {
  51. if (strcmp("/afk", cmdtext, true) == 0)
  52. {
  53. for(new i = 0; i < MAX_PLAYERS; i++) ShowPlayerNameTagForPlayer(playerid, i, false);
  54. if(AFK[playerid] == true) return SendClientMessage(playerid, -1," Você Já Está AFK");
  55. AFK[playerid] = true;
  56. TogglePlayerControllable(playerid, 0);
  57. GetPlayerName(playerid, Nome, sizeof(Nome));
  58. format(Celula, sizeof(Celula), "{1E90FF}O Jogador {7FFFD4}%s {1E90FF}Esta Ausente.", Nome);
  59. GameTextForPlayer(playerid, "~Y~Voce Esta ~Y~em Modo~R~ Afk", 5000, 5);
  60. SendClientMessageToAll(-1, Celula);
  61. return 1;
  62. }
  63.  
  64. if (strcmp("/sairafk", cmdtext, true) == 0)
  65. {
  66. for(new i = 0; i < MAX_PLAYERS; i++) ShowPlayerNameTagForPlayer(playerid, i, true);
  67. if(AFK[playerid] == false) return SendClientMessage(playerid, -1," Você Já Não Está AFK.");
  68. AFK[playerid] = false;
  69. TogglePlayerControllable(playerid, 1);
  70. GetPlayerName(playerid, Nome, sizeof(Nome));
  71. format(Celula, sizeof(Celula), "{1E90FF}O Jogador {7FFFD4}%s {1E90FF}Voltou Ao Jogo.", Nome);
  72. GameTextForPlayer(playerid, "~Y~Voce Saiu ~Y~Do Modo~R~ Afk", 5000, 5);
  73. SendClientMessageToAll(-1, Celula);
  74. return true;
  75. }
  76.  
  77. if (strcmp("/playersafk", cmdtext, true) == 0)
  78. {
  79. SendClientMessage(playerid, 0xFF0000FF , "||======Players Afk======||");
  80.  
  81. for(new i = 0; i < MAX_PLAYERS; i++)
  82. {
  83. if(IsPlayerConnected(i))
  84. {
  85. if((AFK[i] == true))
  86. {
  87. GetPlayerName(i, Nome, sizeof(Nome));
  88. GameTextForPlayer(playerid, "~R~|======Players Afk======|", 5000, 5);
  89. format(Celula, 130, "%s", Nome);
  90. SendClientMessage(playerid, -1, Celula);
  91. }
  92. }
  93. }
  94. return true;
  95. }
  96. return false;
  97. }
  98. public SendMensagens()
  99. {
  100. new string[265];
  101. new random1 = random(sizeof(Mensagens));
  102. new random2 = random(sizeof(Cores));
  103. format(string, sizeof(string), "%s", Mensagens[random1]);
  104. SendClientMessageToAll(Cores[random2],string);
  105. return 1;
  106. }
  107. //==============================================================================
  108. //SISTEM AFK v3.0 CRIADO POR MAU_TITO
  109. //VISITE MEU BLOG SUPORTE-TITO.BLOGSPOT.COM
  110. //MSN PARA CONTATO:[email protected]
  111. //==============================================================================
Advertisement
Add Comment
Please, Sign In to add comment