manusoftar

Untitled

Sep 30th, 2012
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.13 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using GTA;
  6.  
  7.  
  8. namespace GTAModCSHARP {
  9.     class AutoBomba {
  10.         private Vehicle auto;
  11.        
  12.         private Blip icono;
  13.  
  14.         public AutoBomba(Vehicle v, Blip b) {
  15.             auto = v;
  16.             icono = b;
  17.         }
  18.  
  19.         public AutoBomba() {
  20.         }
  21.        
  22.         public void setAuto(Vehicle auto) {
  23.             this.auto = auto;
  24.         }
  25.  
  26.         public void setBlip(Blip b) {
  27.             icono = b;
  28.         }
  29.  
  30.         public Blip getBlip() {
  31.             return icono;
  32.         }
  33.  
  34.         public Vehicle getAuto() {
  35.             return auto;
  36.         }
  37.  
  38.         public void explode(Vector3 pos) {
  39.             if (auto.Position.DistanceTo(pos) <= 100) {
  40.                 auto.Explode();
  41.                 icono.Delete();
  42.             } else {
  43.         //Translation: Bomb car out of range (basically the car is too far away for being detonated)
  44.                 Game.DisplayText("Auto bomba fuera de rango");
  45.             }
  46.         }
  47.  
  48.         public void Delete() {
  49.             icono.Delete();
  50.         }
  51.     }
  52. }
Advertisement
Add Comment
Please, Sign In to add comment