Advertisement
Guest User

[FS]Sugestao

a guest
Oct 11th, 2016
349
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.87 KB | None | 0 0
  1. #include <a_samp>
  2. #include <zcmd>
  3.  
  4. #define Pasta_BUGS "BUGS.pwn"
  5. #define Pasta_SUG "Sugestoes.pwn"
  6. //
  7. #define COLOR_WHITE 0xFFFFFFFF
  8. #define COLOR_LIGHTBLUE 0x33CCFFAA
  9.  
  10. public OnFilterScriptInit()
  11. {
  12. print("\n--------------------------------------");
  13. print(" Relatorio de BUG e Sujestoes.");
  14. print("--------------------------------------\n");
  15. return 1;
  16. }
  17. CMD:rbug(playerid, result[])//Comando Relatar BUG
  18. {
  19. if(isnull(result))//Se o cara só digitar /rbug não vai acontecer nada mas se digitar /rbug [TEXTO] irá pular isso
  20. {
  21. return SendClientMessage(playerid, COLOR_LIGHTBLUE, "USE: /rbug [BUG]");//Envia mensagem ao jogador que digitou só /sujestao
  22. }
  23. new Ano,Mes,Dia,Hora,Minuto,Segundo;
  24. getdate(Ano, Mes, Dia);//Verificar a Data em que o jogador relatou
  25. gettime(Hora, Minuto, Segundo);//verificar a Hora em que o Jogador relatou
  26. SendClientMessage(playerid, COLOR_WHITE, "OK, muito obrigado por relatar este BUG, o servidor agradece!!");//Envia uma mensagem para o jogador
  27. new File:filebug;//criando um new
  28. new MEGAString[2500];
  29. MEGAString[0] = EOS;
  30. filebug = fopen(Pasta_BUGS,io_append);//abre o arquivo de BUGs
  31. format(MEGAString, 256, "//>================= [ %02d/%02d/%04d as %02d:%02d:%02d ] =================<\n\n//Por: %s\nBUG: %s\n\n",
  32. Dia, Mes, Ano,
  33. Hora, Minuto, Segundo,
  34. PlayerName(playerid),
  35. result);//cria uma formatação
  36. fwrite(filebug,MEGAString);//envia a formatação para o arquivo Bugs
  37. fclose(filebug);//fecha o arquivo bugs
  38. SendClientMessage(playerid, COLOR_LIGHTBLUE, "BUG salvo com sucesso!");//Envia mensagem ao jogador avisando que foi enviado o report de BUG
  39. return true;
  40. }
  41. CMD:sujestao(playerid, result[])//Comando sujestão
  42. {
  43. if(isnull(result))//Se o cara digitar só /sujestao sem o texto irá enviar uma mensagem ao jogador
  44. {
  45. return SendClientMessage(playerid, COLOR_LIGHTBLUE, "USE: /sugestao [SUA SUGESTÃO]");//Envia mensagem ao jogador que digitou só /sujestao
  46. }
  47. new Ano,Mes,Dia,Hora,Minuto,Segundo;
  48. getdate(Ano, Mes, Dia);//verifica a Data
  49. gettime(Hora, Minuto, Segundo);//Verifica o Tempo
  50. SendClientMessage(playerid, COLOR_WHITE, "OK, muito obrigado por dar uma sugestão, o servidor agradece!!");//Envia mensagem ao Jogador
  51. new File:filebug;//cria um new
  52. new MEGAString[2500];
  53. MEGAString[0] = EOS;
  54. filebug = fopen(Pasta_SUG,io_append);//abre o arquivo de Sujestao
  55. format(MEGAString, 256, "//>================= [ %02d/%02d/%04d as %02d:%02d:%02d ] =================<\n\n//Por: %s\nSugestao: %s\n\n",
  56. Dia, Mes, Ano,
  57. Hora, Minuto, Segundo,
  58. PlayerName(playerid),
  59. result);//Cria uma formatação.
  60. fwrite(filebug,MEGAString);//Envia a formatação para o arquivo Sujestao
  61. fclose(filebug);//fecha o arquivo sujestao
  62. return true;
  63. }
  64. static stock PlayerName(playerid)
  65. {
  66. new Name[MAX_PLAYER_NAME];
  67. GetPlayerName(playerid, Name, sizeof Name);
  68. return Name;
  69. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement