Advertisement
Extraterrestre

System Easter Eggs - Lowly Brazilian

Sep 10th, 2016
362
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.02 KB | None | 0 0
  1. /*=========================================
  2. || NÃO RETIRE OS CREDITOS!!! ||
  3. || LOWLY BRAZILIAN ||
  4. || (Y) ||
  5. ==========================================*/
  6. #include <a_samp>
  7. #include <zcmd>
  8. #include <sscanf2>
  9. #include <streamer>
  10.  
  11.  
  12. // === GATE === //
  13. new IdEgg;
  14.  
  15. public OnFilterScriptInit()
  16. {
  17. print("\n---------------------------------------");
  18. print(" Filter Script Feito por: Lowly Brazilian");
  19. print("---------------------------------------\n");
  20.  
  21. return 1;
  22. }
  23.  
  24. public OnFilterScriptExit()
  25. {
  26. return 1;
  27. }
  28.  
  29. main()
  30. {
  31. print("\n---------------------------------------");
  32. print(" Filter Script Feito por: Lowly Brazilian");
  33. print("---------------------------------------\n");
  34. }
  35. enum EasterEgg
  36. {
  37. Float:PosEggX,
  38. Float:PosEggY,
  39. Float:PosEggZ,
  40. EggID
  41.  
  42. };
  43. new CreateEgg[MAX_PLAYERS][EasterEgg];
  44.  
  45. CMD:egg(playerid, params[])
  46. {
  47. new string[85];
  48. if(sscanf(params, "d", IdEgg)) return SendClientMessage(playerid, -1, "Use: /egg [id Easter Egg]");
  49.  
  50. SendClientMessage(playerid, -1, "Você criou um Easter Egg , para Editar sua posição use : /Editaregg !");
  51.  
  52. format(string, sizeof(string), "[ATENÇÃO] %s Colocou um Easter Egg em Algum Local do Mapa ! ", pNome(playerid));
  53. SendClientMessageToAll(-1, string);
  54.  
  55. GetPlayerPos(playerid, CreateEgg[playerid][PosEggX], CreateEgg[playerid][PosEggY], CreateEgg[playerid][PosEggZ]);
  56.  
  57. CreateEgg[playerid][EggID] = CreateDynamicObject(IdEgg, CreateEgg[playerid][PosEggX], CreateEgg[playerid][PosEggY], CreateEgg[playerid][PosEggZ], 0, 0, 0, 0, 0, 0);
  58. return 1;
  59. }
  60. CMD:editaregg(playerid)
  61. {
  62. new string[50];
  63.  
  64. if(IsPlayerInRangeOfPoint(playerid, 4.0, CreateEgg[playerid][PosEggX], CreateEgg[playerid][PosEggY], CreateEgg[playerid][PosEggZ]))
  65. {
  66. format(string, sizeof(string), "Objeto ID : %d Selecionado para Edição.", CreateEgg[playerid][EggID]);
  67. SendClientMessage(playerid, -1, string);
  68.  
  69. EditDynamicObject(playerid, CreateEgg[playerid][EggID]);
  70. return 1;
  71. }
  72. return 1;
  73. }
  74.  
  75. // *** COMANDO EXTRA PARA SER MELHORADO *** //
  76. CMD:abriregg(playerid)
  77. {
  78. new string[124];
  79. if(IsPlayerInRangeOfPoint(playerid, 4.0, CreateEgg[playerid][PosEggX], CreateEgg[playerid][PosEggY], CreateEgg[playerid][PosEggZ]))
  80. {
  81. new MoneyEggs = randomEx(1, 100);
  82.  
  83. format(string, sizeof(string), "Você Abriu o Easter Egg , Número %d é Você encontrou R$%d,00 reais.", CreateEgg[playerid][EggID], MoneyEggs);
  84. SendClientMessage(playerid, -1, string);
  85.  
  86. DestroyDynamicObject(CreateEgg[playerid][EggID]);
  87. return 1;
  88. }
  89. return 1;
  90. }
  91.  
  92. randomEx(Min, Max) return (random(((Max - Min) + 1)) + Min);
  93.  
  94. stock pNome(playerid)
  95. {
  96. new name[MAX_PLAYER_NAME];
  97. GetPlayerName(playerid, name, sizeof(name));
  98. return name;
  99. }
  100. /*=========================================
  101. || NÃO RETIRE OS CREDITOS!!! ||
  102. || LOWLY BRAZILIAN ||
  103. || (Y) ||
  104. ==========================================*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement