Advertisement
shandai

FS de sistema do céu

May 20th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.73 KB | None | 0 0
  1. #include <a_samp>
  2. #include <zcmd>
  3. #include <sscanf2>
  4.  
  5. new bool:CuraRapida[MAX_PLAYERS] = true;
  6. new bool:Morreu[MAX_PLAYERS] = false;
  7.  
  8. new TempoRecuperandoSe;
  9.  
  10. new TempoLocal[MAX_PLAYERS] = 0;
  11.  
  12. new Float:MacaAposMorrer[6][4] = {
  13. {1159.7764, -1305.0938, 9281.3076, 95.8811},
  14. {1161.3806, -1305.1771, 9281.3076, 88.9876},
  15. {1163.3702, -1305.0962, 9281.3076, 91.7352},
  16. {1165.2333, -1305.1454, 9281.3076, 91.2044},
  17. {1166.9817, -1305.3794, 9281.3076, 90.8186},
  18. {1168.7142, -1305.3842, 9281.3076, 90.1919}
  19. };
  20.  
  21. public OnFilterScriptInit()
  22. {
  23.  
  24. TempoRecuperandoSe = SetTimer("RecuperouSe", 1000, true); aqui é o tempo e la em baixo tem mais
  25.  
  26. // Aqui voce vai por o mapa do interior que voce deseja - Interior
  27.  
  28.  
  29. AddStaticPickup(); // Entre parentes voce pode por coordenadas pra por pickup
  30.  
  31. Create3DTextLabel("Colaca O Nome\n/entrar", 0x008080FF, 1172.5526, -1323.2614, 15.4028, 20.0, 0, 0); // entrada de algum lugar
  32. Create3DTextLabel("Colaca O Nome\n/sair", 0x008080FF, 1177.3695, -1340.4095, 9280.5693, 20.0, 0, 0); // Saida de algum lugar
  33. Create3DTextLabel("Colaca O Nome\n/curarme", 0x008080FF, 1163.2344, -1340.1019, 9280.5693, 20.0, 0, 0); // uma entrada aonde o player vai voltar
  34. return 1;
  35. }
  36.  
  37. public OnPlayerConnect(playerid)
  38. {
  39. SendClientMessage(playerid, 0x008080FF, "Pode colocar qualquer anuncio se voce tiver exemplo abaixo ");
  40. return 1;
  41. }
  42.  
  43. public OnPlayerSpawn(playerid)
  44. {
  45. SendClientMessage(playerid, 0x008080FF, "algum anuncio");
  46. if(Morreu[playerid])
  47. {
  48. SetPlayerHealth(playerid, 5.0);
  49. new randmaca = random(sizeof(MacaAposMorrer));
  50. SetPlayerPos(playerid, MacaAposMorrer[randmaca][0], MacaAposMorrer[randmaca][1], MacaAposMorrer[randmaca][2]);
  51. SetPlayerFacingAngle(playerid, MacaAposMorrer[randmaca][3]);
  52. SetPlayerInterior(playerid, 1);
  53. ClearAnimations(playerid);
  54. ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
  55. SetPlayerCameraPos(playerid, 1159.3287, -1314.6178, 9282.0693);
  56. SetPlayerCameraLookAt(playerid, 1164.3419, -1305.1895, 9280.5693);
  57. GameTextForPlayer(playerid, "~r~Voce sera recuperado em alguns segundos~n~Aguarde", 60000, 4);
  58. return 1;
  59. }
  60. return 1;
  61. }
  62.  
  63. CMD:entrar(playerid)
  64. {
  65. if(IsPlayerInRangeOfPoint(playerid, 1.0, 1172.5526, -1323.2614, 15.4028))
  66. {
  67. SetPlayerInterior(playerid, 1);
  68. SetPlayerPos(playerid, 1177.3695, -1340.4095, 9280.5693);
  69. GameTextForPlayer(playerid, "~r~nome do local", 5000, 1);
  70. SetPlayerFacingAngle(playerid, 90);
  71. SetCameraBehindPlayer(playerid);
  72. }
  73. else SendClientMessage(playerid, 0xA9C4E4AA, "{FF0000}(ERRO){A9C4E4}: Você não está em nenhuma porta.");
  74. return 1;
  75. }
  76.  
  77. CMD:sair(playerid)
  78. {
  79. if(IsPlayerInRangeOfPoint(playerid, 1.0, 1177.3695, -1340.4095, 9280.5693))
  80. {
  81. SetPlayerInterior(playerid, 0);
  82. SetPlayerPos(playerid, 1172.5526, -1323.2614, 15.4028);
  83. GameTextForPlayer(playerid, "~w~Los Santos", 5000, 1);
  84. SetPlayerFacingAngle(playerid, 270);
  85. SetCameraBehindPlayer(playerid);
  86. }
  87. else SendClientMessage(playerid, 0xA9C4E4AA, "{FF0000}(ERRO){A9C4E4}: Você não está em nenhuma porta.");
  88. return 1;
  89. }
  90.  
  91. public OnPlayerDeath(playerid, killerid, reason)
  92. {
  93. Morreu[playerid] = true;
  94. return 1;
  95. }
  96.  
  97. forward BlockCurarMe(playerid);
  98. public BlockCurarMe(playerid) return CuraRapida[playerid] = true, 1;
  99.  
  100. forward RecuperouSe();
  101. public RecuperouSe()
  102. {
  103. for(new p = 0; p < MAX_PLAYERS; p++)
  104. {
  105. if(Morreu[p])
  106. {
  107. TempoLocal[p]++;
  108. new Float:vida;
  109. GetPlayerHealth(p, vida);
  110. ApplyAnimation(p, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
  111. switch(TempoLocal[p])
  112. {
  113. case 1 .. 59:
  114. {
  115. SetPlayerHealth(p, vida+1);
  116. }
  117. case 60:
  118. {
  119. Morreu[p] = false;
  120. SendClientMessage(p, 0xA9C4E4AA, "");
  121. SendClientMessage(p, 0xA9C4E4AA, "{DD2222}Médico{FFFFFF} diz: Você foi recuperado. Seja mais cuidado a partir de agora.");
  122. ClearAnimations(p);
  123. SetPlayerPos(p, 1175.0963, -1318.3589, 9280.5693);
  124. SetCameraBehindPlayer(p);
  125. SetPlayerFacingAngle(p, 177.8791);
  126. SetPlayerInterior(p, 1);
  127. TempoLocal[p] = 0;
  128. }
  129. }
  130. }
  131. }
  132. return 1;
  133. }
  134.  
  135. public OnFilterScriptExit()
  136. {
  137. KillTimer(TempoRecuperandoSe);
  138. return 1;
  139. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement