Advertisement
Eddlm

Timed bleeding

Mar 16th, 2016
523
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.42 KB | None | 0 0
  1. using GTA;
  2. using System;
  3.  
  4.  
  5.  
  6. public class Bleeding : Script
  7. {
  8.     int ReferenceTime = Game.GameTime;
  9.     int Interval = 15000;
  10.     public Bleeding()
  11.     {
  12.         Tick += OnTick;
  13.  
  14.     }
  15.  
  16.     void OnTick(object sender, EventArgs e)
  17.     {
  18.         if(Game.GameTime > ReferenceTime + Interval)
  19.         {
  20.             ReferenceTime = Game.GameTime;
  21.             Game.Player.Character.Health -= 1;
  22.         }
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement