public static bool GetStealthMovement(this Ped ped)
 {
     return((bool)Function.Call <bool>((Hash)8947185480862490559L, new InputArgument[1]
     {
         InputArgument.op_Implicit(((Entity)ped).get_Handle())
     }));
 }
 public static void SetMovementAnimSet(this Ped ped, string animation)
 {
     if (Entity.op_Equality((Entity)ped, (Entity)null))
     {
         return;
     }
     while (true)
     {
         if (Function.Call <bool>((Hash) - 4257582536886376016L, new InputArgument[1]
         {
             InputArgument.op_Implicit(animation)
         }) == 0)
         {
             Function.Call((Hash)7972635428772450029L, new InputArgument[1]
             {
                 InputArgument.op_Implicit(animation)
             });
             Script.Yield();
         }
         else
         {
             break;
         }
     }
     Function.Call((Hash) - 5797657820774978577L, new InputArgument[3]
     {
         InputArgument.op_Implicit(((Entity)ped).get_Handle()),
         InputArgument.op_Implicit(animation),
         InputArgument.op_Implicit(1048576000)
     });
 }
Exemple #3
0
    private void drawDateTime()
    {
        float xpos = (float)(1.0 - Function.Call <float>((Hash) - 1067213516044759673L, new InputArgument[1]
        {
            InputArgument.op_Implicit(false)
        }) / 10.0) + this.xOffsetRight;
        float ypos = 0.0f;

        if (this.reallifeDateTime)
        {
            this.drawString2("DATE " + DateTime.Now.ToString("dd MM yy ddd", (IFormatProvider)CultureInfo.InvariantCulture).ToUpper() + "\nTIME " + DateTime.Now.ToString("HH mm ss", (IFormatProvider)CultureInfo.InvariantCulture), xpos, ypos, 0.5f, this.color_HUD, false);
        }
        else
        {
            string str1 = ((int)Function.Call <int>((Hash)4400224173958044981L, new InputArgument[0])).ToString();
            if (str1.Length == 1)
            {
                str1 = "0" + str1;
            }
            string str2 = (Function.Call <int>((Hash) - 4915917506096244831L, new InputArgument[0]) + 1).ToString();
            if (str2.Length == 1)
            {
                str2 = "0" + str2;
            }
            string str3 = ((int)Function.Call <int>((Hash) - 7631499212557191401L, new InputArgument[0])).ToString();
            this.drawString2("DATE " + str1 + " " + str2 + " " + str3 + "\nTIME " + World.get_CurrentDayTime().ToString().Replace(":", " "), xpos, ypos, 0.5f, this.color_HUD, false);
        }
    }
Exemple #4
0
    private void draw3DRadar()
    {
        if ((long)Environment.TickCount >= this.lastTimeGetAllVehicles + this.getAllVehiclesInterval)
        {
            if (this.vehicles != null)
            {
                Array.Clear((Array)this.vehicles, 0, this.vehicles.Length);
            }
            this.vehicles = Array.FindAll <Vehicle>(World.GetAllVehicles(), (Predicate <Vehicle>)(v =>
            {
                Model model1 = ((Entity)v).get_Model();
                if (!((Model) ref model1).get_IsPlane())
                {
                    Model model2 = ((Entity)v).get_Model();
                    if (!((Model) ref model2).get_IsHelicopter())
                    {
                        Model model3 = ((Entity)v).get_Model();
                        if (!((Model) ref model3).get_IsCargobob())
                        {
                            goto label_5;
                        }
                    }
                }
                if (Entity.op_Inequality((Entity)v, (Entity)this.Aircraft))
                {
                    Vector3 position = ((Entity)v).get_Position();
                    return((double)((Vector3) ref position).DistanceTo(((Entity)this.Aircraft).get_Position()) <= (double)this.blipRadius);
                }
                label_5:
                return(false);
            }));
            this.lastTimeGetAllVehicles = (long)Environment.TickCount;
        }
        int num1 = 1;

        foreach (Vehicle vehicle in this.vehicles)
        {
            if (Entity.op_Inequality((Entity)vehicle, (Entity)this.Aircraft) && vehicle.get_IsDriveable() && ((Entity)vehicle).get_IsOnScreen())
            {
                if (Function.Call <bool>((Hash) - 225189090236849748L, new InputArgument[3]
                {
                    InputArgument.op_Implicit(vehicle),
                    InputArgument.op_Implicit(this.Aircraft),
                    InputArgument.op_Implicit(17)
                }) != null && !((Entity)vehicle).get_IsOccluded())
                {
                    Point screen = UI.WorldToScreen(((Entity)vehicle).get_Position());
                    float xpos   = (float)screen.X / (float)UI.WIDTH;
                    float num2   = (float)screen.Y / (float)UI.HEIGHT;
                    if (screen.X != 0 && screen.Y != 0)
                    {
                        UI.DrawTexture("scripts//Jet_HUD//Rectangle.png", num1, 1, 100, UI.WorldToScreen(((Entity)vehicle).get_Position()), new PointF(0.5f, 0.5f), new Size(this.correctedWidth, 30), 0.0f, this.color_HUD);
                        ++num1;
                        Vector3 position = ((Entity)vehicle).get_Position();
                        this.drawString2("\nDST: " + ((Vector3) ref position).DistanceTo(((Entity)this.Aircraft).get_Position()).ToString("0"), xpos, num2 - 0.085f, 0.5f, this.color_HUD, true);
                    }
                }
            }
        }
    }
 public static void SetFrontendRadioActive(bool active)
 {
     Function.Call((Hash) - 580282179644691528L, new InputArgument[1]
     {
         InputArgument.op_Implicit(active ? 1 : 0)
     });
 }
 public static void SetParkedVehicleDensityMultiplierThisFrame(float multiplier)
 {
     Function.Call((Hash) - 1520285072926450915L, new InputArgument[1]
     {
         InputArgument.op_Implicit(multiplier)
     });
 }
 public static void RemoveAllShockingEvents(bool toggle)
 {
     Function.Call((Hash) - 1536878670296045748L, new InputArgument[1]
     {
         InputArgument.op_Implicit(toggle ? 1 : 0)
     });
 }
 public static void SetScenarioPedDensityThisMultiplierFrame(float multiplier)
 {
     Function.Call((Hash)8815058788752046232L, new InputArgument[1]
     {
         InputArgument.op_Implicit(multiplier)
     });
 }
 public static void SetPedDensityThisMultiplierFrame(float multiplier)
 {
     Function.Call((Hash) - 7646032285877768974L, new InputArgument[1]
     {
         InputArgument.op_Implicit(multiplier)
     });
 }
 public static void RemoveElegantly(this Ped ped)
 {
     Function.Call((Hash) - 6022081966519748258L, new InputArgument[1]
     {
         InputArgument.op_Implicit(((Entity)ped).get_Handle())
     });
 }
        public static void DisplayHelpTextThisFrame(string helpText, bool ignoreMenus = false)
        {
            if (!ignoreMenus && MenuConrtoller.MenuPool.IsAnyMenuOpen())
            {
                return;
            }
            Function.Call((Hash) - 8860350453193909743L, new InputArgument[1]
            {
                InputArgument.op_Implicit("CELL_EMAIL_BCON")
            });
            int startIndex = 0;

            while (startIndex < helpText.Length)
            {
                Function.Call((Hash)7789129354908300458L, new InputArgument[1]
                {
                    InputArgument.op_Implicit(helpText.Substring(startIndex, Math.Min(99, helpText.Length - startIndex)))
                });
                startIndex += 99;
            }
            Function.Call((Hash)2562546386151446694L, new InputArgument[4]
            {
                InputArgument.op_Implicit(0),
                InputArgument.op_Implicit(0),
                InputArgument.op_Implicit(Function.Call <bool>((Hash)5582567543607241831L, new InputArgument[0]) != null ? 0 : 1),
                InputArgument.op_Implicit(-1)
            });
        }
 public static void SetVehicleDensityMultiplierThisFrame(float multiplier)
 {
     Function.Call((Hash)2619521048766764343L, new InputArgument[1]
     {
         InputArgument.op_Implicit(multiplier)
     });
 }
Exemple #13
0
 public bool Exists()
 {
     return((bool)Function.Call <bool>((GTA.Native.Hash) 8230805619690780346L, new InputArgument[1]
     {
         InputArgument.op_Implicit(this.Handle)
     }));
 }
Exemple #14
0
 public bool Exists()
 {
     return((bool)Function.Call <bool>((Hash)8408201869211353243L, new InputArgument[1]
     {
         InputArgument.op_Implicit(this.Handle)
     }));
 }
 public static void SetRandomVehicleDensityMultiplierThisFrame(float multiplier)
 {
     Function.Call((Hash) - 5497991812566059053L, new InputArgument[1]
     {
         InputArgument.op_Implicit(multiplier)
     });
 }
 public static bool IsCurrentWeaponSileced(this Ped ped)
 {
     return((bool)Function.Call <bool>((Hash)7345588343449861831L, new InputArgument[1]
     {
         InputArgument.op_Implicit(((Entity)ped).get_Handle())
     }));
 }
 public static bool IsAmbientSpeechPlaying(this Ped ped)
 {
     return((bool)Function.Call <bool>((Hash) - 8038141706915823699L, new InputArgument[1]
     {
         InputArgument.op_Implicit(((Entity)ped).get_Handle())
     }));
 }
 private static void AddKit(Vehicle vehicle, VehicleData data)
 {
     if (data == null || Entity.op_Equality((Entity)vehicle, (Entity)null))
     {
         return;
     }
     vehicle.InstallModKit();
     VehicleNeonLight[] neonLights = data.NeonLights;
     if (neonLights != null)
     {
         ((IEnumerable <VehicleNeonLight>)neonLights).ToList <VehicleNeonLight>().ForEach((Action <VehicleNeonLight>)(h => vehicle.SetNeonLightsOn(h, true)));
     }
     data.Mods?.ForEach((Action <Tuple <VehicleMod, int> >)(m => vehicle.SetMod(m.get_Item1(), m.get_Item2(), true)));
     VehicleToggleMod[] toggleMods = data.ToggleMods;
     if (toggleMods != null)
     {
         ((IEnumerable <VehicleToggleMod>)toggleMods).ToList <VehicleToggleMod>().ForEach((Action <VehicleToggleMod>)(h => vehicle.ToggleMod(h, true)));
     }
     vehicle.set_WindowTint(data.WindowTint);
     vehicle.set_WheelType(data.WheelType);
     vehicle.set_NeonLightsColor(data.NeonColor);
     Function.Call((Hash)6971396915951620534L, new InputArgument[2]
     {
         InputArgument.op_Implicit(((Entity)vehicle).get_Handle()),
         InputArgument.op_Implicit(data.Livery)
     });
 }
 public static bool IsUsingAnyScenario(this Ped ped)
 {
     return((bool)Function.Call <bool>((Hash)6317224474499895619L, new InputArgument[1]
     {
         InputArgument.op_Implicit(((Entity)ped).get_Handle())
     }));
 }
Exemple #20
0
 public void Delete()
 {
     Function.Call((Hash) - 4323085940105063473L, new InputArgument[2]
     {
         InputArgument.op_Implicit(this.Handle),
         InputArgument.op_Implicit(1)
     });
 }
 public static void SetHearingRange(this Ped ped, float hearingRange)
 {
     Function.Call((Hash)3722497735840494396L, new InputArgument[2]
     {
         InputArgument.op_Implicit(((Entity)ped).get_Handle()),
         InputArgument.op_Implicit(hearingRange)
     });
 }
 public static bool CanHearPlayer(this Ped ped, Player player)
 {
     return((bool)Function.Call <bool>((Hash) - 966241770451121623L, new InputArgument[2]
     {
         InputArgument.op_Implicit(player.get_Handle()),
         InputArgument.op_Implicit(((Entity)ped).get_Handle())
     }));
 }
 public static void SetCanEvasiveDive(this Ped ped, bool toggle)
 {
     Function.Call((Hash)7744612924842995801L, new InputArgument[2]
     {
         InputArgument.op_Implicit(((Entity)ped).get_Handle()),
         InputArgument.op_Implicit(toggle ? 1 : 0)
     });
 }
 public static void SetCombatMovement(this Ped ped, CombatMovement movement)
 {
     Function.Call((Hash)5592521861259579479L, new InputArgument[2]
     {
         InputArgument.op_Implicit(((Entity)ped).get_Handle()),
         InputArgument.op_Implicit((int)movement)
     });
 }
 public static void SetCombatRange(this Ped ped, CombatRange range)
 {
     Function.Call((Hash)4350590797670664571L, new InputArgument[2]
     {
         InputArgument.op_Implicit(((Entity)ped).get_Handle()),
         InputArgument.op_Implicit((int)range)
     });
 }
 public static void SetPathAvoidFires(this Ped ped, bool toggle)
 {
     Function.Call((Hash)4923931356997885536L, new InputArgument[2]
     {
         InputArgument.op_Implicit(((Entity)ped).get_Handle()),
         InputArgument.op_Implicit(toggle ? 1 : 0)
     });
 }
 public static void SetCanPlayAmbientAnims(this Ped ped, bool toggle)
 {
     Function.Call((Hash)7166301455914477326L, new InputArgument[2]
     {
         InputArgument.op_Implicit(((Entity)ped).get_Handle()),
         InputArgument.op_Implicit(toggle ? 1 : 0)
     });
 }
 public static void StopSpeaking(this Ped ped, bool shaking)
 {
     Function.Call((Hash) - 7105317640777702445L, new InputArgument[2]
     {
         InputArgument.op_Implicit(((Entity)ped).get_Handle()),
         InputArgument.op_Implicit(shaking ? 1 : 0)
     });
 }
 public static void DisablePainAudio(this Ped ped, bool toggle)
 {
     Function.Call((Hash) - 6222817867460529944L, new InputArgument[2]
     {
         InputArgument.op_Implicit(((Entity)ped).get_Handle()),
         InputArgument.op_Implicit(toggle ? 1 : 0)
     });
 }
 public static void SetCombatAblility(this Ped ped, CombatAbility ability)
 {
     Function.Call((Hash) - 4079649877180351064L, new InputArgument[2]
     {
         InputArgument.op_Implicit(((Entity)ped).get_Handle()),
         InputArgument.op_Implicit((int)ability)
     });
 }