Advertisement
Guest User

Sistema de Morte - v2.0 by MineiriinHo

a guest
Apr 23rd, 2016
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 2.42 KB | None | 0 0
  1. //•.•.•.•.•.•.•.•.•.•.•.•.•.•.•. INCLUDES •.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.
  2. #include <a_samp>
  3.  
  4. #include <zcmd>
  5.  
  6. //•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•. OUTROS •.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.
  7.  
  8. #if defined FILTERSCRIPT
  9.  
  10. //•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.• NEWS L. •.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.
  11.  
  12. new PedMorto[MAX_PLAYERS];
  13.  
  14. new TempoDeMorte[MAX_PLAYERS];
  15.  
  16. //•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•. DEFINES •.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•
  17.  
  18.  
  19.  
  20. //•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.• PUBLICS •.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.
  21. public OnFilterScriptInit()
  22. {
  23.     print("\n-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=");
  24.     print("           Death System v2.0\nFeito por MineiriinHo");
  25.     print("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n");
  26.     return 1;
  27. }
  28.  
  29. public OnFilterScriptExit()
  30. {
  31.     return 1;
  32. }
  33.  
  34. public OnPlayerSpawn(playerid)
  35. {
  36.     if(PedMorto[playerid] == 1)
  37.     PedMorto[playerid] = 0;
  38.     return 1;
  39. }
  40.  
  41. public OnPlayerDeath(playerid)
  42. {
  43.     SetTimerEx("AcabarTempoDeMorte", 60000, false, "i", playerid); // no 60000, troque por seu tempo desejado. Lembrando : O tempo é em milissegundos!
  44.     new Float:x, Float:y, Float:z;
  45.     GetPlayerPos(playerid, x, y, z);
  46.     SetPlayerPos(playerid, x, y, z);
  47.     PedMorto[playerid] = 1;
  48.     ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 0, 1, 1, 1, -1);
  49.     SendClientMessage(playerid, -1, "{FF0000}[190] {FFFFFF}Você está gravemente ferido! Acione a polícia e os paramédicos!");
  50.     return 1;
  51. }
  52.  
  53. forward AcabarTempoDeMorte(playerid);
  54. public AcabarTempoDeMorte(playerid)
  55. {
  56.     SpawnPlayer(playerid);
  57.  
  58.     if(PedMorto[playerid] == 1)
  59.         PedMorto[playerid] = 0;
  60.  
  61.     TempoDeMorte[playerid] = 0;
  62.  
  63.     SetPlayerHealth(playerid, 100);
  64.     return 1;
  65. }
  66.  
  67. CMD:reviver(playerid)
  68. {
  69.     if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "Você não é Administrador!");
  70.     new Float:x, Float:y, Float:z;
  71.     GetPlayerPos(playerid, x, y, z);
  72.     SetPlayerPos(playerid, x, y, z);
  73.     if(PedMorto[playerid] == 1)
  74.     PedMorto[playerid] = 0;
  75.     SetPlayerHealth(playerid, 100);
  76.     return 1;
  77. }
  78.  
  79. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement