Advertisement
Guest User

Death System by MineiriinHo

a guest
Apr 21st, 2016
517
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 3.42 KB | None
  1. //•.•.•.•.•.•.•.•.•.•.•.•.•. INCLUDES •.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.
  2. #include <a_samp>
  3. #include <zcmd>
  4. #include <sscanf2>
  5.  
  6. #if defined FILTERSCRIPT
  7.  
  8. //•.•.•.•.•.•.•.•.•.•.•.•.•. NEWS STR •.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.
  9.  
  10. new timeOfDeath[MAX_PLAYERS];
  11.  
  12. new PedMorto[MAX_PLAYERS];
  13.  
  14. new Text:Textdraw0;
  15.  
  16. //•.•.•.•.•.•.•.•.•.•.•.•.•.•.• CORES •.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.
  17.  
  18. #define COLOR_WHITE     0xFFFFFFAA
  19. #define COLOR_PURPLE    0xF077FFAA
  20. #define COLOR_RED       0xFF0000AA
  21.  
  22. //•.•.•.•.•.•.•.•.•.•.•.•.•.•.• PUBLICS •.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.
  23.  
  24. public OnFilterScriptInit()
  25. {
  26.     Textdraw0 = TextDrawCreate(25.768722, 424.083557, "/aceitarmorte");
  27.     TextDrawLetterSize(Textdraw0, 0.450937, 1.594166);
  28.     TextDrawAlignment(Textdraw0, 1);
  29.     TextDrawColor(Textdraw0, -2147483393);
  30.     TextDrawSetShadow(Textdraw0, 0);
  31.     TextDrawSetOutline(Textdraw0, 1);
  32.     TextDrawBackgroundColor(Textdraw0, 51);
  33.     TextDrawFont(Textdraw0, 1);
  34.     TextDrawSetProportional(Textdraw0, 1);
  35.  
  36.     print("\n--------------------------------------");
  37.     print(" Death System feito por : MineiriinHo   ");
  38.     print("--------------------------------------\n");
  39.     return 1;
  40. }
  41.  
  42. public OnFilterScriptExit()
  43. {
  44.     print("\n--------------------------------------");
  45.     print(" Obrigado por Utilizar meu Script ! <3  ");
  46.     print("--------------------------------------\n");
  47.     return 1;
  48. }
  49.  
  50. public OnPlayerDeath(playerid, killerid, reason)
  51. {
  52.     timeOfDeath[playerid] = gettime();
  53.     new Float:x, Float:y, Float:z;
  54.     GetPlayerPos(playerid, x, y, z);
  55.     SetPlayerPos(playerid, x, y, z);
  56.     PedMorto[playerid] = 1;
  57.     TextDrawShowForPlayer(playerid, Textdraw0);
  58.     ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 0, 1, 1, 1, -1);
  59.     SendClientMessage(playerid, -1, "{FF0000}[190] {FFFFFF}Você está ferido! Acione a polícia e os paramédicos!");
  60.     return 1;
  61. }
  62.  
  63. //•.•.•.•.•.•.•.•.•.•.•.•.• COMANDO DO JOGADOR •.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•
  64.  
  65. CMD:aceitarmorte(playerid, params[])
  66. {
  67.     if((gettime() - timeOfDeath[playerid]) < 60) return SendClientMessage(playerid, COLOR_RED, "Você deve esperar Um Minuto para aceitar sua morte");
  68.  
  69.     new Float:x, Float:y, Float:z;
  70.     GetPlayerPos(playerid, x, y, z);
  71.     SetPlayerPos(playerid, x, y, z);
  72.  
  73.     if(PedMorto[playerid] == 1)
  74.     PedMorto[playerid] = 0;
  75.  
  76.     timeOfDeath[playerid] = 0;
  77.  
  78.     SetPlayerHealth(playerid, 100);
  79.     TextDrawHideForPlayer(playerid, Textdraw0);
  80.     return 1;
  81. }
  82.  
  83. //•.•.•.•.•.•.•.•.•.•.•.•.• COMANDO DO ADMINISTRADOR •.•.•.•.•.•.•.•.•.•.•.•.•.•
  84.  
  85. CMD:reviver(playerid, params[])
  86. {
  87.     if(!IsPlayerAdmin(playerid))
  88.         return SendClientMessage(playerid, COLOR_RED, "Você não é Administrador!"); // Substitua por sua variável de Admin
  89.     if(sscanf(params, "u", text)) return SendClientMessage(playerid, COLOR_GREY, "SINTAXE: /reviver [ID]");
  90.     new Float:x, Float:y, Float:z;
  91.     GetPlayerPos(playerid, x, y, z);
  92.     SetPlayerPos(playerid, x, y, z);
  93.     if(PedMorto[playerid] == 1)
  94.     PedMorto[playerid] = 0;
  95.     SetPlayerHealth(playerid, 100);
  96.     return 1;
  97. }
  98.  
  99. #endif
Advertisement
RAW Paste Data Copied
Advertisement