Advertisement
PedroRzX

Sistema de Minas

Feb 2nd, 2016
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.05 KB | None | 0 0
  1. /*
  2. ########## ########## ######### ########## ##########
  3. ### ### ########## ########## ### ### #### ####
  4. ### ### ### ### ### ### ### ### ###
  5. ########## ########## ### ## ########## ### ###
  6. ### ########## ### ## ###### ### ###
  7. ### ### ### ### ### ### ### ###
  8. ### ########## ########## ### ### #### ####
  9. ### ########## ######### ### ### ########## - Não Retire Os Creditos !
  10. - Copie os Codigos e Adicione ao Teu GM !
  11. */
  12. // ====================== [ TOPO DO GM ] ==============================
  13. #include <a_samp>
  14.  
  15. enum Mina
  16. {
  17. Float:minax,
  18. Float:minay,
  19. Float:minaz,
  20. };
  21. new MinaInfo[MInfo];
  22. new ColocouMina;
  23. new mina;
  24. // ====================== [ Public OnPlayerCommandText ] ==============================
  25. if (strcmp("/minaterrestre", cmdtext, true, 10) == 0)
  26. {
  27. if(ColocouMina == 1) return SendClientMessage(playerid, -1, "<!> Já Foi Colocada uma Mina Terrestre !");
  28. new Float:x,Float:y,Float:z;
  29. GetPlayerPos(playerid, x,y,z);
  30. MinaInfo[minax] = x;
  31. MinaInfo[minay] = y;
  32. MinaInfo[minaz] = z;
  33. ColocouMina = 1;
  34. mina = CreateObject(363,x,y,z-0.4,0,0,0,350);
  35. SendClientMessage(playerid, -1, "<!> Você Plantou um Mina, Não Se Aproxime !");
  36. SetPlayerPos(playerid, x,y+8,z);
  37. return 1;
  38. }
  39. // ====================== [ Public OnPlayerUpdate ] ==============================
  40. if(IsPlayerInRangeOfPoint(playerid, 5.0, MinaInfo[minax],MinaInfo[minay],MinaInfo[minaz]))
  41. {
  42. new Float:x,Float:y,Float:z;
  43. GetPlayerPos(playerid, x,y,z);
  44. GameTextForPlayer(playerid, "<!> Mina Terrestre ! **BUUM**",1000, 1);
  45. ColocouMina = 0;
  46. DestroyObject(mina);
  47. CreateExplosion(x,y,z,12,10);
  48. MinaInfo[minax] = 0;
  49. MinaInfo[minay] = 0;
  50. MinaInfo[minaz] = 0;
  51. return 1;
  52. }
  53. return 1;
  54. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement