Advertisement
Guest User

VagosDoors

a guest
Sep 26th, 2019
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.72 KB | None | 0 0
  1. using GTA;
  2. using GTA.Native;
  3. using System;
  4. using System.Windows.Forms;
  5.  
  6. namespace VagosDoors
  7. {
  8.     public class Main : Script
  9.     {
  10.         bool Initialized = false;
  11.  
  12.         public Main()
  13.         {
  14.             Tick += OnTick;
  15.         }
  16.  
  17.         void RequestIpl(string iplName)
  18.         {
  19.             if (!Function.Call<bool>(Hash.IS_IPL_ACTIVE, iplName))
  20.             {
  21.                 Function.Call(Hash.REQUEST_IPL, iplName);
  22.             }
  23.         }
  24.  
  25.         void OnTick(object sender, EventArgs e)
  26.         {
  27.             if (!Initialized)
  28.             {
  29.                 Script.Wait(1000);
  30.                 RequestIpl("bkr_bi_id1_23_door");
  31.                 Initialized = true;
  32.             }
  33.         }
  34.     }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement