Search Results for

    Show / Hide Table of Contents

    Class World

    Inheritance
    Object
    World
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: GTA
    Assembly: ScriptHookVDotNet3.dll
    Syntax
    public static class World

    Properties

    | Improve this Doc View Source

    AnimatedBuildingCapacity

    The total number of AnimatedBuildings that can exist in the world.

    Declaration
    public static int AnimatedBuildingCapacity { get; }
    Property Value
    Type Description
    Int32
    | Improve this Doc View Source

    AnimatedBuildingCount

    A fast way to get the total number of AnimatedBuildings spawned in the world.

    Declaration
    public static int AnimatedBuildingCount { get; }
    Property Value
    Type Description
    Int32
    | Improve this Doc View Source

    Blackout

    Sets a value indicating whether lights in the World should be rendered.

    Declaration
    public static bool Blackout { set; }
    Property Value
    Type Description
    Boolean

    true if blackout; otherwise, false.

    | Improve this Doc View Source

    BuildingCapacity

    The total number of Buildings that can exist in the world.

    Declaration
    public static int BuildingCapacity { get; }
    Property Value
    Type Description
    Int32
    | Improve this Doc View Source

    BuildingCount

    A fast way to get the total number of Buildings spawned in the world.

    Declaration
    public static int BuildingCount { get; }
    Property Value
    Type Description
    Int32
    | Improve this Doc View Source

    CurrentDate

    Gets or sets the current date and time in the GTA World.

    Declaration
    public static DateTime CurrentDate { get; set; }
    Property Value
    Type Description
    DateTime

    The current date and time.

    | Improve this Doc View Source

    CurrentTimeOfDay

    Gets or sets the current time of day in the GTA World.

    Declaration
    public static TimeSpan CurrentTimeOfDay { get; set; }
    Property Value
    Type Description
    TimeSpan

    The current time of day

    | Improve this Doc View Source

    EntityColliderCapacity

    The total number of Entity colliders can be used. The return value can be different in different versions.

    When EntityColliderCount reaches this value, no more Entity will not be able to be physically moved and Vehicles and Props will not be able to detach fragment parts properly.

    Declaration
    public static int EntityColliderCapacity { get; }
    Property Value
    Type Description
    Int32
    | Improve this Doc View Source

    EntityColliderCount

    Returns the total number of Entity colliders used.

    Declaration
    public static int EntityColliderCount { get; }
    Property Value
    Type Description
    Int32
    | Improve this Doc View Source

    GravityLevel

    Sets the gravity level for all World objects.

    Declaration
    public static float GravityLevel { get; set; }
    Property Value
    Type Description
    Single

    The gravity level: 9.8f - Default gravity. 2.4f - Moon gravity. 0.1f - Very low gravity. 0.0f - No gravity.

    | Improve this Doc View Source

    InteriorInstanceCapacity

    The total number of InteriorInstances that can exist in the world.

    Declaration
    public static int InteriorInstanceCapacity { get; }
    Property Value
    Type Description
    Int32
    | Improve this Doc View Source

    InteriorInstanceCount

    A fast way to get the total number of InteriorInstances spawned in the world.

    Declaration
    public static int InteriorInstanceCount { get; }
    Property Value
    Type Description
    Int32
    | Improve this Doc View Source

    InteriorProxyCapacity

    The total number of InteriorProxys the game can manage at the same time in the InteriorProxy pool.

    Declaration
    public static int InteriorProxyCapacity { get; }
    Property Value
    Type Description
    Int32
    | Improve this Doc View Source

    InteriorProxyCount

    A fast way to get the total number of InteriorProxys managed in the InteriorProxy pool.

    Declaration
    public static int InteriorProxyCount { get; }
    Property Value
    Type Description
    Int32
    | Improve this Doc View Source

    IsClockPaused

    Gets or sets a value indicating whether the in-game clock is paused.

    Declaration
    public static bool IsClockPaused { get; set; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    MillisecondsPerGameMinute

    Gets or sets how many milliseconds in the real world one game minute takes.

    Declaration
    public static int MillisecondsPerGameMinute { get; set; }
    Property Value
    Type Description
    Int32

    The milliseconds one game minute takes in the real world.

    | Improve this Doc View Source

    NextWeather

    Gets or sets the next weather.

    Declaration
    public static Weather NextWeather { get; set; }
    Property Value
    Type Description
    Weather

    The next weather.

    | Improve this Doc View Source

    PedCapacity

    The total number of Peds that can exist in the world.

    Declaration
    public static int PedCapacity { get; }
    Property Value
    Type Description
    Int32
    Remarks

    The game will crash when the number of Ped is the same as this limit and the game tries to create a Ped.

    | Improve this Doc View Source

    PedCount

    A fast way to get the total number of Peds spawned in the world.

    Declaration
    public static int PedCount { get; }
    Property Value
    Type Description
    Int32
    | Improve this Doc View Source

    PickupObjectCapacity

    The total number of Props in the world associated with a Pickup that can exist in the world.

    Declaration
    public static int PickupObjectCapacity { get; }
    Property Value
    Type Description
    Int32
    | Improve this Doc View Source

    PickupObjectCount

    A fast way to get the total number of Props in the world associated with a Pickup.

    Declaration
    public static int PickupObjectCount { get; }
    Property Value
    Type Description
    Int32
    | Improve this Doc View Source

    ProjectileCapacity

    The total number of Projectiles that can exist in the world. Always returns 50 currently since the limit is hard-coded in the exe.

    Declaration
    public static int ProjectileCapacity { get; }
    Property Value
    Type Description
    Int32
    | Improve this Doc View Source

    ProjectileCount

    A fast way to get the total number of Projectiles spawned in the world.

    Declaration
    public static int ProjectileCount { get; }
    Property Value
    Type Description
    Int32
    | Improve this Doc View Source

    PropCapacity

    The total number of Props that can exist in the world.

    Declaration
    public static int PropCapacity { get; }
    Property Value
    Type Description
    Int32
    Remarks

    The game will crash when the number of Prop is the same as this limit and the game tries to create a Prop.

    | Improve this Doc View Source

    PropCount

    A fast way to get the total number of Props spawned in the world.

    Declaration
    public static int PropCount { get; }
    Property Value
    Type Description
    Int32
    | Improve this Doc View Source

    RenderingCamera

    Gets or sets the rendering camera.

    Declaration
    public static Camera RenderingCamera { get; set; }
    Property Value
    Type Description
    Camera

    The rendering Camera.

    Remarks

    Setting to null sets the rendering Camera to GameplayCamera.

    | Improve this Doc View Source

    VehicleCapacity

    The total number of Vehicles that can exist in the world.

    Declaration
    public static int VehicleCapacity { get; }
    Property Value
    Type Description
    Int32
    Remarks

    The game will crash when the number of Vehicle is the same as this limit and the game tries to create a Vehicle.

    | Improve this Doc View Source

    VehicleCount

    A fast way to get the total number of Vehicles spawned in the world.

    Declaration
    public static int VehicleCount { get; }
    Property Value
    Type Description
    Int32
    | Improve this Doc View Source

    WaypointBlip

    Gets the waypoint blip.

    Declaration
    public static Blip WaypointBlip { get; }
    Property Value
    Type Description
    Blip

    The Vector3 coordinates of the Waypoint Blip

    Remarks

    Returns null if a waypoint Blip hasn't been set

    | Improve this Doc View Source

    WaypointPosition

    Gets or sets the waypoint position.

    Declaration
    public static Vector3 WaypointPosition { get; set; }
    Property Value
    Type Description
    Vector3

    The Vector3 coordinates of the Waypoint Blip

    Remarks

    Returns an empty Vector3 if a waypoint Blip hasn't been set If the game engine cant extract height information the Z component will be 0.0f

    | Improve this Doc View Source

    Weather

    Gets or sets the weather.

    Declaration
    public static Weather Weather { get; set; }
    Property Value
    Type Description
    Weather

    The weather.

    Methods

    | Improve this Doc View Source

    AddExplosion(Vector3, ExplosionType, Single, Single, Ped, Boolean, Boolean)

    Creates an explosion in the world

    Declaration
    public static void AddExplosion(Vector3 position, ExplosionType type, float radius, float cameraShake, Ped owner = null, bool aubidble = true, bool invisible = false)
    Parameters
    Type Name Description
    Vector3 position

    The position of the explosion.

    ExplosionType type

    The type of explosion.

    Single radius

    The radius of the explosion.

    Single cameraShake

    The amount of camera shake to apply to nearby cameras.

    Ped owner

    The Ped who caused the explosion, leave null if no one caused the explosion.

    Boolean aubidble

    if set to true explosion can be heard.

    Boolean invisible

    if set to true explosion is invisible.

    | Improve this Doc View Source

    AddRelationshipGroup(String)

    Creates a RelationshipGroup with the given name.

    Declaration
    public static RelationshipGroup AddRelationshipGroup(string name)
    Parameters
    Type Name Description
    String name

    The name of the relationship group.

    Returns
    Type Description
    RelationshipGroup
    | Improve this Doc View Source

    AddRope(RopeType, Vector3, Vector3, Single, Single, Boolean)

    Spawns a Rope.

    Declaration
    public static Rope AddRope(RopeType type, Vector3 position, Vector3 rotation, float length, float minLength, bool breakable)
    Parameters
    Type Name Description
    RopeType type

    The type of Rope.

    Vector3 position

    The position of the Rope.

    Vector3 rotation

    The rotation of the Rope.

    Single length

    The length of the Rope.

    Single minLength

    The minimum length of the Rope.

    Boolean breakable

    if set to true the Rope will break if shot.

    Returns
    Type Description
    Rope
    | Improve this Doc View Source

    CalculateTravelDistance(Vector3, Vector3)

    Calculates the travel distance using roads and paths between 2 positions.

    Declaration
    public static float CalculateTravelDistance(Vector3 origin, Vector3 destination)
    Parameters
    Type Name Description
    Vector3 origin

    The origin.

    Vector3 destination

    The destination.

    Returns
    Type Description
    Single

    The travel distance

    | Improve this Doc View Source

    CreateAmbientPickup(PickupType, Vector3, Model, Int32)

    Spawns a pickup Prop at the specified position.

    Declaration
    public static Prop CreateAmbientPickup(PickupType type, Vector3 position, Model model, int value)
    Parameters
    Type Name Description
    PickupType type
    Vector3 position
    Model model
    Int32 value
    Returns
    Type Description
    Prop
    | Improve this Doc View Source

    CreateBlip(Vector3)

    Creates a Blip at the given position on the map.

    Declaration
    public static Blip CreateBlip(Vector3 position)
    Parameters
    Type Name Description
    Vector3 position

    The position of the blip on the map.

    Returns
    Type Description
    Blip
    | Improve this Doc View Source

    CreateBlip(Vector3, Single)

    Creates a Blip for a circular area at the given position on the map.

    Declaration
    public static Blip CreateBlip(Vector3 position, float radius)
    Parameters
    Type Name Description
    Vector3 position

    The position of the blip on the map.

    Single radius

    The radius of the area on the map.

    Returns
    Type Description
    Blip
    | Improve this Doc View Source

    CreateCamera(Vector3, Vector3, Single)

    Creates a Camera, use RenderingCamera to switch to this camera

    Declaration
    public static Camera CreateCamera(Vector3 position, Vector3 rotation, float fov)
    Parameters
    Type Name Description
    Vector3 position

    The position of the camera.

    Vector3 rotation

    The rotation of the camera.

    Single fov

    The field of view of the camera.

    Returns
    Type Description
    Camera
    | Improve this Doc View Source

    CreateCheckpoint(CheckpointCustomIcon, Vector3, Vector3, Single, Color)

    Creates a Checkpoint in the world.

    Declaration
    public static Checkpoint CreateCheckpoint(CheckpointCustomIcon icon, Vector3 position, Vector3 pointTo, float radius, Color color)
    Parameters
    Type Name Description
    CheckpointCustomIcon icon

    The CheckpointCustomIcon to display inside the Checkpoint.

    Vector3 position

    The position in the World.

    Vector3 pointTo

    The position in the world where this Checkpoint should point.

    Single radius

    The radius of the Checkpoint.

    Color color

    The color of the Checkpoint.

    Returns
    Type Description
    Checkpoint
    Remarks

    returns null if the Checkpoint could not be created

    | Improve this Doc View Source

    CreateCheckpoint(CheckpointIcon, Vector3, Vector3, Single, Color)

    Creates a Checkpoint in the world.

    Declaration
    public static Checkpoint CreateCheckpoint(CheckpointIcon icon, Vector3 position, Vector3 pointTo, float radius, Color color)
    Parameters
    Type Name Description
    CheckpointIcon icon

    The CheckpointIcon to display inside the Checkpoint.

    Vector3 position

    The position in the World.

    Vector3 pointTo

    The position in the world where this Checkpoint should point.

    Single radius

    The radius of the Checkpoint.

    Color color

    The color of the Checkpoint.

    Returns
    Type Description
    Checkpoint
    Remarks

    returns null if the Checkpoint could not be created

    | Improve this Doc View Source

    CreateParticleEffect(ParticleEffectAsset, String, Entity, Vector3, Vector3, Single, InvertAxisFlags)

    Creates a ParticleEffect on an Entity that runs looped.

    Declaration
    public static ParticleEffect CreateParticleEffect(ParticleEffectAsset asset, string effectName, Entity entity, Vector3 offset = default(Vector3), Vector3 rotation = default(Vector3), float scale = 1F, InvertAxisFlags invertAxis = InvertAxisFlags.None)
    Parameters
    Type Name Description
    ParticleEffectAsset asset

    The effect asset to use.

    String effectName

    The name of the Effect

    Entity entity

    The Entity the effect is attached to.

    Vector3 offset

    The offset from the entity to attach the effect.

    Vector3 rotation

    The rotation, relative to the entity, the effect has.

    Single scale

    How much to scale the size of the effect by.

    InvertAxisFlags invertAxis

    Which axis to flip the effect in. For a car side exhaust you may need to flip in the Y Axis.

    Returns
    Type Description
    ParticleEffect
    | Improve this Doc View Source

    CreateParticleEffect(ParticleEffectAsset, String, EntityBone, Vector3, Vector3, Single, InvertAxisFlags)

    Creates a ParticleEffect on an EntityBone that runs looped.

    Declaration
    public static ParticleEffect CreateParticleEffect(ParticleEffectAsset asset, string effectName, EntityBone entityBone, Vector3 offset = default(Vector3), Vector3 rotation = default(Vector3), float scale = 1F, InvertAxisFlags invertAxis = InvertAxisFlags.None)
    Parameters
    Type Name Description
    ParticleEffectAsset asset

    The effect asset to use.

    String effectName

    The name of the Effect

    EntityBone entityBone

    The EntityBone the effect is attached to.

    Vector3 offset

    The offset from the entityBone to attach the effect.

    Vector3 rotation

    The rotation, relative to the entityBone, the effect has.

    Single scale

    How much to scale the size of the effect by.

    InvertAxisFlags invertAxis

    Which axis to flip the effect in. For a car side exhaust you may need to flip in the Y Axis.

    Returns
    Type Description
    ParticleEffect
    | Improve this Doc View Source

    CreateParticleEffect(ParticleEffectAsset, String, Vector3, Vector3, Single, InvertAxisFlags)

    Creates a ParticleEffect at a position that runs looped.

    Declaration
    public static ParticleEffect CreateParticleEffect(ParticleEffectAsset asset, string effectName, Vector3 position, Vector3 rotation = default(Vector3), float scale = 1F, InvertAxisFlags invertAxis = InvertAxisFlags.None)
    Parameters
    Type Name Description
    ParticleEffectAsset asset

    The effect asset to use.

    String effectName

    The name of the effect.

    Vector3 position

    The world coordinates where the effect is.

    Vector3 rotation

    What rotation to apply to the effect.

    Single scale

    How much to scale the size of the effect by.

    InvertAxisFlags invertAxis

    Which axis to flip the effect in.

    Returns
    Type Description
    ParticleEffect
    | Improve this Doc View Source

    CreateParticleEffectNonLooped(ParticleEffectAsset, String, Entity, Vector3, Vector3, Single, InvertAxisFlags)

    Starts a Particle Effect on an Entity that runs once then is destroyed.

    Declaration
    public static bool CreateParticleEffectNonLooped(ParticleEffectAsset asset, string effectName, Entity entity, Vector3 off = default(Vector3), Vector3 rot = default(Vector3), float scale = 1F, InvertAxisFlags invertAxis = InvertAxisFlags.None)
    Parameters
    Type Name Description
    ParticleEffectAsset asset

    The effect asset to use.

    String effectName

    the name of the effect.

    Entity entity

    The Entity the effect is attached to.

    Vector3 off

    The offset from the entity to attach the effect.

    Vector3 rot

    The rotation, relative to the entity, the effect has.

    Single scale

    How much to scale the size of the effect by.

    InvertAxisFlags invertAxis

    Which axis to flip the effect in. For a car side exahust you may need to flip in the Y Axis

    Returns
    Type Description
    Boolean

    trueIf the effect was able to start; otherwise, false.

    | Improve this Doc View Source

    CreateParticleEffectNonLooped(ParticleEffectAsset, String, EntityBone, Vector3, Vector3, Single, InvertAxisFlags)

    Starts a Particle Effect on an EntityBone that runs once then is destroyed.

    Declaration
    public static bool CreateParticleEffectNonLooped(ParticleEffectAsset asset, string effectName, EntityBone entityBone, Vector3 off = default(Vector3), Vector3 rot = default(Vector3), float scale = 1F, InvertAxisFlags invertAxis = InvertAxisFlags.None)
    Parameters
    Type Name Description
    ParticleEffectAsset asset

    The effect asset to use.

    String effectName

    the name of the effect.

    EntityBone entityBone

    The EntityBone the effect is attached to.

    Vector3 off

    The offset from the entityBone to attach the effect.

    Vector3 rot

    The rotation, relative to the entityBone, the effect has.

    Single scale

    How much to scale the size of the effect by.

    InvertAxisFlags invertAxis

    Which axis to flip the effect in. For a car side exahust you may need to flip in the Y Axis

    Returns
    Type Description
    Boolean

    trueIf the effect was able to start; otherwise, false.

    | Improve this Doc View Source

    CreateParticleEffectNonLooped(ParticleEffectAsset, String, Vector3, Vector3, Single, InvertAxisFlags)

    Starts a Particle Effect that runs once at a given position then is destroyed.

    Declaration
    public static bool CreateParticleEffectNonLooped(ParticleEffectAsset asset, string effectName, Vector3 pos, Vector3 rot = default(Vector3), float scale = 1F, InvertAxisFlags invertAxis = InvertAxisFlags.None)
    Parameters
    Type Name Description
    ParticleEffectAsset asset

    The effect asset to use.

    String effectName

    The name of the effect.

    Vector3 pos

    The World position where the effect is.

    Vector3 rot

    What rotation to apply to the effect.

    Single scale

    How much to scale the size of the effect by.

    InvertAxisFlags invertAxis

    Which axis to flip the effect in.

    Returns
    Type Description
    Boolean

    trueIf the effect was able to start; otherwise, false.

    | Improve this Doc View Source

    CreatePed(Model, Vector3, Single)

    Spawns a Ped of the given Model at the position and heading specified.

    Declaration
    public static Ped CreatePed(Model model, Vector3 position, float heading = 0F)
    Parameters
    Type Name Description
    Model model

    The Model of the Ped.

    Vector3 position

    The position to spawn the Ped at.

    Single heading

    The heading of the Ped.

    Returns
    Type Description
    Ped
    Remarks

    returns null if the Ped could not be spawned.

    | Improve this Doc View Source

    CreatePickup(PickupType, Vector3, Vector3, Model, Int32)

    Spawns a Pickup at the specified position.

    Declaration
    public static Pickup CreatePickup(PickupType type, Vector3 position, Vector3 rotation, Model model, int value)
    Parameters
    Type Name Description
    PickupType type
    Vector3 position
    Vector3 rotation
    Model model
    Int32 value
    Returns
    Type Description
    Pickup
    | Improve this Doc View Source

    CreatePickup(PickupType, Vector3, Model, Int32)

    Spawns a Pickup at the specified position.

    Declaration
    public static Pickup CreatePickup(PickupType type, Vector3 position, Model model, int value)
    Parameters
    Type Name Description
    PickupType type
    Vector3 position
    Model model
    Int32 value
    Returns
    Type Description
    Pickup
    | Improve this Doc View Source

    CreateProp(Model, Vector3, Vector3, Boolean, Boolean)

    Spawns a Prop of the given Model at the specified position.

    Declaration
    public static Prop CreateProp(Model model, Vector3 position, Vector3 rotation, bool dynamic, bool placeOnGround)
    Parameters
    Type Name Description
    Model model

    The Model of the Prop.

    Vector3 position

    The position to spawn the Prop at.

    Vector3 rotation

    The rotation of the Prop.

    Boolean dynamic

    if set to true the Prop will have physics; otherwise, it will be static.

    Boolean placeOnGround

    if set to true place the prop on the ground nearest to the position.

    Returns
    Type Description
    Prop
    Remarks

    returns null if the Prop could not be spawned.

    | Improve this Doc View Source

    CreateProp(Model, Vector3, Boolean, Boolean)

    Spawns a Prop of the given Model at the specified position.

    Declaration
    public static Prop CreateProp(Model model, Vector3 position, bool dynamic, bool placeOnGround)
    Parameters
    Type Name Description
    Model model

    The Model of the Prop.

    Vector3 position

    The position to spawn the Prop at.

    Boolean dynamic

    if set to true the Prop will have physics; otherwise, it will be static.

    Boolean placeOnGround

    if set to true place the prop on the ground nearest to the position.

    Returns
    Type Description
    Prop
    Remarks

    returns null if the Prop could not be spawned.

    | Improve this Doc View Source

    CreatePropNoOffset(Model, Vector3, Vector3, Boolean)

    Spawns a Prop of the given Model at the specified position without any offset.

    Declaration
    public static Prop CreatePropNoOffset(Model model, Vector3 position, Vector3 rotation, bool dynamic)
    Parameters
    Type Name Description
    Model model

    The Model of the Prop.

    Vector3 position

    The position to spawn the Prop at.

    Vector3 rotation

    The rotation of the Prop.

    Boolean dynamic

    if set to true the Prop will have physics; otherwise, it will be static.

    Returns
    Type Description
    Prop
    Remarks

    returns null if the Prop could not be spawned.

    | Improve this Doc View Source

    CreatePropNoOffset(Model, Vector3, Boolean)

    Spawns a Prop of the given Model at the specified position without any offset.

    Declaration
    public static Prop CreatePropNoOffset(Model model, Vector3 position, bool dynamic)
    Parameters
    Type Name Description
    Model model

    The Model of the Prop.

    Vector3 position

    The position to spawn the Prop at.

    Boolean dynamic

    if set to true the Prop will have physics; otherwise, it will be static.

    Returns
    Type Description
    Prop
    Remarks

    returns null if the Prop could not be spawned.

    | Improve this Doc View Source

    CreateRandomPed(Vector3)

    Spawns a Ped of a random Model at the position specified.

    Declaration
    public static Ped CreateRandomPed(Vector3 position)
    Parameters
    Type Name Description
    Vector3 position

    The position to spawn the Ped at.

    Returns
    Type Description
    Ped
    | Improve this Doc View Source

    CreateRandomPed(Vector3, Single, Func<Model, Boolean>)

    Spawns a Ped of a random Model at the position specified.

    Declaration
    public static Ped CreateRandomPed(Vector3 position, float heading, Func<Model, bool> predicate = null)
    Parameters
    Type Name Description
    Vector3 position

    The position to spawn the Ped at.

    Single heading

    The heading of the Ped.

    Func<Model, Boolean> predicate

    The method that determines whether a model should be considered when choosing a random model for the Ped. If null is set, gangster and animal models will not be chosen, just like CREATE_PED does.

    Returns
    Type Description
    Ped
    | Improve this Doc View Source

    CreateRandomVehicle(Vector3, Single, Func<Model, Boolean>)

    Spawns a Vehicle of a random Model at the position specified.

    Declaration
    public static Vehicle CreateRandomVehicle(Vector3 position, float heading = 0F, Func<Model, bool> predicate = null)
    Parameters
    Type Name Description
    Vector3 position

    The position to spawn the Vehicle at.

    Single heading

    The heading of the Vehicle.

    Func<Model, Boolean> predicate

    The method that determines whether a model should be considered when choosing a random model for the Vehicle.

    Returns
    Type Description
    Vehicle
    Remarks

    returns null if the Vehicle could not be spawned.

    | Improve this Doc View Source

    CreateVehicle(Model, Vector3, Single)

    Spawns a Vehicle of the given Model at the position and heading specified.

    Declaration
    public static Vehicle CreateVehicle(Model model, Vector3 position, float heading = 0F)
    Parameters
    Type Name Description
    Model model

    The Model of the Vehicle.

    Vector3 position

    The position to spawn the Vehicle at.

    Single heading

    The heading of the Vehicle.

    Returns
    Type Description
    Vehicle
    Remarks

    returns null if the Vehicle could not be spawned.

    | Improve this Doc View Source

    DestroyAllCameras()

    Destroys all user created Cameras.

    Declaration
    public static void DestroyAllCameras()
    | Improve this Doc View Source

    DrawLightWithRange(Vector3, Color, Single, Single)

    Draws light around a region.

    Declaration
    public static void DrawLightWithRange(Vector3 position, Color color, float range, float intensity)
    Parameters
    Type Name Description
    Vector3 position

    The position to center the light around.

    Color color

    The color of the light.

    Single range

    How far the light should extend to.

    Single intensity

    The intensity: 0.0f being no intensity, 1.0f being full intensity.

    | Improve this Doc View Source

    DrawLine(Vector3, Vector3, Color)

    Declaration
    public static void DrawLine(Vector3 start, Vector3 end, Color color)
    Parameters
    Type Name Description
    Vector3 start
    Vector3 end
    Color color
    | Improve this Doc View Source

    DrawMarker(MarkerType, Vector3, Vector3, Vector3, Vector3, Color, Boolean, Boolean, Boolean, String, String, Boolean)

    Draws a marker in the world, this needs to be done on a per frame basis

    Declaration
    public static void DrawMarker(MarkerType type, Vector3 pos, Vector3 dir, Vector3 rot, Vector3 scale, Color color, bool bobUpAndDown = false, bool faceCamera = false, bool rotateY = false, string textueDict = null, string textureName = null, bool drawOnEntity = false)
    Parameters
    Type Name Description
    MarkerType type

    The type of marker.

    Vector3 pos

    The position of the marker.

    Vector3 dir

    The direction the marker points in.

    Vector3 rot

    The rotation of the marker.

    Vector3 scale

    The amount to scale the marker by.

    Color color

    The color of the marker.

    Boolean bobUpAndDown

    if set to true the marker will bob up and down.

    Boolean faceCamera

    if set to true the marker will always face the camera, regardless of its rotation.

    Boolean rotateY

    if set to true rotates only on the y axis(heading).

    String textueDict

    Name of texture dictionary to load the texture from, leave null for no texture in the marker.

    String textureName

    Name of texture inside the dictionary to load the texture from, leave null for no texture in the marker.

    Boolean drawOnEntity

    if set to true draw on any Entity that intersects the marker.

    | Improve this Doc View Source

    DrawPolygon(Vector3, Vector3, Vector3, Color)

    Declaration
    public static void DrawPolygon(Vector3 vertexA, Vector3 vertexB, Vector3 vertexC, Color color)
    Parameters
    Type Name Description
    Vector3 vertexA
    Vector3 vertexB
    Vector3 vertexC
    Color color
    | Improve this Doc View Source

    DrawSpotLight(Vector3, Vector3, Color, Single, Single, Single, Single, Single)

    Declaration
    public static void DrawSpotLight(Vector3 pos, Vector3 dir, Color color, float distance, float brightness, float roundness, float radius, float fadeout)
    Parameters
    Type Name Description
    Vector3 pos
    Vector3 dir
    Color color
    Single distance
    Single brightness
    Single roundness
    Single radius
    Single fadeout
    | Improve this Doc View Source

    DrawSpotLightWithShadow(Vector3, Vector3, Color, Single, Single, Single, Single, Single)

    Declaration
    public static void DrawSpotLightWithShadow(Vector3 pos, Vector3 dir, Color color, float distance, float brightness, float roundness, float radius, float fadeout)
    Parameters
    Type Name Description
    Vector3 pos
    Vector3 dir
    Color color
    Single distance
    Single brightness
    Single roundness
    Single radius
    Single fadeout
    | Improve this Doc View Source

    GetAllAnimatedBuildings()

    Declaration
    public static AnimatedBuilding[] GetAllAnimatedBuildings()
    Returns
    Type Description
    AnimatedBuilding[]
    | Improve this Doc View Source

    GetAllBlips(BlipSprite[])

    Gets an array of all the Blips on the map with a given BlipSprite.

    Declaration
    public static Blip[] GetAllBlips(params BlipSprite[] blipTypes)
    Parameters
    Type Name Description
    BlipSprite[] blipTypes

    The blip types to include, leave blank to get all Blips.

    Returns
    Type Description
    Blip[]
    | Improve this Doc View Source

    GetAllBuildings()

    Declaration
    public static Building[] GetAllBuildings()
    Returns
    Type Description
    Building[]
    | Improve this Doc View Source

    GetAllCheckpoints()

    Gets an array of all the Checkpoints.

    Declaration
    public static Checkpoint[] GetAllCheckpoints()
    Returns
    Type Description
    Checkpoint[]
    | Improve this Doc View Source

    GetAllEntities()

    Gets an array of all Entitys in the World.

    Declaration
    public static Entity[] GetAllEntities()
    Returns
    Type Description
    Entity[]
    | Improve this Doc View Source

    GetAllInteriorInstances()

    Declaration
    public static InteriorInstance[] GetAllInteriorInstances()
    Returns
    Type Description
    InteriorInstance[]
    | Improve this Doc View Source

    GetAllInteriorProxies()

    Declaration
    public static InteriorProxy[] GetAllInteriorProxies()
    Returns
    Type Description
    InteriorProxy[]
    | Improve this Doc View Source

    GetAllPeds(Model[])

    Gets an arrayof all Peds in the World.

    Declaration
    public static Ped[] GetAllPeds(params Model[] models)
    Parameters
    Type Name Description
    Model[] models

    The Model of Peds to get, leave blank for all Ped Models.

    Returns
    Type Description
    Ped[]
    | Improve this Doc View Source

    GetAllPickupObjects()

    Gets an array of all Props in the World associated with a Pickup.

    Declaration
    public static Prop[] GetAllPickupObjects()
    Returns
    Type Description
    Prop[]
    | Improve this Doc View Source

    GetAllProjectiles()

    Gets an array of all Projectiles in the World.

    Declaration
    public static Projectile[] GetAllProjectiles()
    Returns
    Type Description
    Projectile[]
    | Improve this Doc View Source

    GetAllProps(Model[])

    Gets an array of all Props in the World.

    Declaration
    public static Prop[] GetAllProps(params Model[] models)
    Parameters
    Type Name Description
    Model[] models

    The Model of Props to get, leave blank for all Prop Models.

    Returns
    Type Description
    Prop[]
    | Improve this Doc View Source

    GetAllVehicles(Model[])

    Gets an array of all Vehicles in the World.

    Declaration
    public static Vehicle[] GetAllVehicles(params Model[] models)
    Parameters
    Type Name Description
    Model[] models

    The Model of Vehicles to get, leave blank for all Vehicle Models.

    Returns
    Type Description
    Vehicle[]
    | Improve this Doc View Source

    GetClosest(Vector2, AnimatedBuilding[])

    Gets the closest AnimatedBuilding to a given position in the World ignoring height.

    Declaration
    public static AnimatedBuilding GetClosest(Vector2 position, params AnimatedBuilding[] animatedBuildings)
    Parameters
    Type Name Description
    Vector2 position

    The position to check against.

    AnimatedBuilding[] animatedBuildings

    The animated building to check.

    Returns
    Type Description
    AnimatedBuilding

    The closest AnimatedBuilding to the position

    | Improve this Doc View Source

    GetClosest(Vector2, Building[])

    Gets the closest Building to a given position in the World ignoring height.

    Declaration
    public static Building GetClosest(Vector2 position, params Building[] buildings)
    Parameters
    Type Name Description
    Vector2 position

    The position to check against.

    Building[] buildings

    The buildings to check.

    Returns
    Type Description
    Building

    The closest Building to the position

    | Improve this Doc View Source

    GetClosest(Vector2, InteriorInstance[])

    Gets the closest InteriorInstance to a given position in the World ignoring height.

    Declaration
    public static InteriorInstance GetClosest(Vector2 position, params InteriorInstance[] interiorInstances)
    Parameters
    Type Name Description
    Vector2 position

    The position to check against.

    InteriorInstance[] interiorInstances

    The interior instances to check.

    Returns
    Type Description
    InteriorInstance

    The closest InteriorInstance to the interiorInstances

    | Improve this Doc View Source

    GetClosest(Vector2, InteriorProxy[])

    Gets the closest InteriorProxy to a given position in the World ignoring height.

    Declaration
    public static InteriorProxy GetClosest(Vector2 position, params InteriorProxy[] interiorProxies)
    Parameters
    Type Name Description
    Vector2 position

    The position to check against.

    InteriorProxy[] interiorProxies

    The spatials to check.

    Returns
    Type Description
    InteriorProxy

    The closest InteriorProxy to the position

    | Improve this Doc View Source

    GetClosest(Vector3, AnimatedBuilding[])

    Gets the closest AnimatedBuilding to a given position in the World.

    Declaration
    public static AnimatedBuilding GetClosest(Vector3 position, params AnimatedBuilding[] animatedBuildings)
    Parameters
    Type Name Description
    Vector3 position

    The position to check against.

    AnimatedBuilding[] animatedBuildings

    The animated building to check.

    Returns
    Type Description
    AnimatedBuilding

    The closest AnimatedBuilding to the position

    | Improve this Doc View Source

    GetClosest(Vector3, Building[])

    Gets the closest Building to a given position in the World.

    Declaration
    public static Building GetClosest(Vector3 position, params Building[] buildings)
    Parameters
    Type Name Description
    Vector3 position

    The position to check against.

    Building[] buildings

    The buildings to check.

    Returns
    Type Description
    Building

    The closest Building to the position

    | Improve this Doc View Source

    GetClosest(Vector3, InteriorInstance[])

    Gets the closest InteriorInstance to a given position in the World.

    Declaration
    public static InteriorInstance GetClosest(Vector3 position, params InteriorInstance[] interiorInstances)
    Parameters
    Type Name Description
    Vector3 position

    The position to check against.

    InteriorInstance[] interiorInstances

    The spatials to check.

    Returns
    Type Description
    InteriorInstance

    The closest InteriorInstance to the position

    | Improve this Doc View Source

    GetClosest(Vector3, InteriorProxy[])

    Gets the closest InteriorProxy to a given position in the World.

    Declaration
    public static InteriorProxy GetClosest(Vector3 position, params InteriorProxy[] interiorProxies)
    Parameters
    Type Name Description
    Vector3 position

    The position to check against.

    InteriorProxy[] interiorProxies

    The spatials to check.

    Returns
    Type Description
    InteriorProxy

    The closest InteriorProxy to the position

    | Improve this Doc View Source

    GetClosest<T>(Vector2, T[])

    Gets the closest ISpatial to a given position in the World ignoring height.

    Declaration
    public static T GetClosest<T>(Vector2 position, params T[] spatials)
        where T : ISpatial
    Parameters
    Type Name Description
    Vector2 position

    The position to check against.

    T[] spatials

    The spatials to check.

    Returns
    Type Description
    T

    The closest ISpatial to the position

    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    GetClosest<T>(Vector3, T[])

    Gets the closest ISpatial to a given position in the World.

    Declaration
    public static T GetClosest<T>(Vector3 position, params T[] spatials)
        where T : ISpatial
    Parameters
    Type Name Description
    Vector3 position

    The position to check against.

    T[] spatials

    The spatials to check.

    Returns
    Type Description
    T

    The closest ISpatial to the position

    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    GetClosestAnimatedBuilding(Vector3, Single)

    Declaration
    public static AnimatedBuilding GetClosestAnimatedBuilding(Vector3 position, float radius)
    Parameters
    Type Name Description
    Vector3 position
    Single radius
    Returns
    Type Description
    AnimatedBuilding
    | Improve this Doc View Source

    GetClosestBuilding(Vector3, Single)

    Declaration
    public static Building GetClosestBuilding(Vector3 position, float radius)
    Parameters
    Type Name Description
    Vector3 position
    Single radius
    Returns
    Type Description
    Building
    | Improve this Doc View Source

    GetClosestInteriorInstance(Vector3, Single)

    Declaration
    public static InteriorInstance GetClosestInteriorInstance(Vector3 position, float radius)
    Parameters
    Type Name Description
    Vector3 position
    Single radius
    Returns
    Type Description
    InteriorInstance
    | Improve this Doc View Source

    GetClosestInteriorProxy(Vector3, Single)

    Declaration
    public static InteriorProxy GetClosestInteriorProxy(Vector3 position, float radius)
    Parameters
    Type Name Description
    Vector3 position
    Single radius
    Returns
    Type Description
    InteriorProxy
    | Improve this Doc View Source

    GetClosestPed(Vector3, Single, Model[])

    Gets the closest Ped to a given position in the World.

    Declaration
    public static Ped GetClosestPed(Vector3 position, float radius, params Model[] models)
    Parameters
    Type Name Description
    Vector3 position

    The position to find the nearest Ped.

    Single radius

    The maximum distance from the position to detect Peds.

    Model[] models

    The Model of Peds to get, leave blank for all Ped Models.

    Returns
    Type Description
    Ped
    Remarks

    Returns null if no Ped was in the given region.

    | Improve this Doc View Source

    GetClosestPickupObject(Vector3, Single)

    Gets the closest Prop to a given position in the World associated with a Pickup.

    Declaration
    public static Prop GetClosestPickupObject(Vector3 position, float radius)
    Parameters
    Type Name Description
    Vector3 position

    The position to find the nearest Prop.

    Single radius

    The maximum distance from the position to detect Props.

    Returns
    Type Description
    Prop
    Remarks

    Returns null if no Prop was in the given region.

    | Improve this Doc View Source

    GetClosestProjectile(Vector3, Single)

    Gets the closest Projectile to a given position in the World.

    Declaration
    public static Projectile GetClosestProjectile(Vector3 position, float radius)
    Parameters
    Type Name Description
    Vector3 position

    The position to find the nearest Projectile.

    Single radius

    The maximum distance from the position to detect Projectiles.

    Returns
    Type Description
    Projectile
    Remarks

    Returns null if no Projectile was in the given region.

    | Improve this Doc View Source

    GetClosestProp(Vector3, Single, Model[])

    Gets the closest Prop to a given position in the World.

    Declaration
    public static Prop GetClosestProp(Vector3 position, float radius, params Model[] models)
    Parameters
    Type Name Description
    Vector3 position

    The position to find the nearest Prop.

    Single radius

    The maximum distance from the position to detect Props.

    Model[] models

    The Model of Props to get, leave blank for all Prop Models.

    Returns
    Type Description
    Prop
    Remarks

    Returns null if no Prop was in the given region.

    | Improve this Doc View Source

    GetClosestVehicle(Vector3, Single, Model[])

    Gets the closest Vehicle to a given position in the World.

    Declaration
    public static Vehicle GetClosestVehicle(Vector3 position, float radius, params Model[] models)
    Parameters
    Type Name Description
    Vector3 position

    The position to find the nearest Vehicle.

    Single radius

    The maximum distance from the position to detect Vehicles.

    Model[] models

    The Model of Vehicles to get, leave blank for all Vehicle Models.

    Returns
    Type Description
    Vehicle
    Remarks

    Returns null if no Vehicle was in the given region.

    | Improve this Doc View Source

    GetCrosshairCoordinates()

    Determines where the crosshair intersects with the world.

    Declaration
    public static RaycastResult GetCrosshairCoordinates()
    Returns
    Type Description
    RaycastResult

    A RaycastResult containing information about where the crosshair intersects with the world.

    | Improve this Doc View Source

    GetCrosshairCoordinates(IntersectFlags, Entity)

    Determines where the crosshair intersects with the world.

    Declaration
    public static RaycastResult GetCrosshairCoordinates(IntersectFlags intersectOptions = IntersectFlags.Everything, Entity ignoreEntity = null)
    Parameters
    Type Name Description
    IntersectFlags intersectOptions

    Type of environment the raycast should intersect with.

    Entity ignoreEntity

    Prevent the raycast detecting a specific Entity.

    Returns
    Type Description
    RaycastResult

    A RaycastResult containing information about where the crosshair intersects with the world.

    | Improve this Doc View Source

    GetDistance(Vector3, Vector3)

    Gets the straight line distance between 2 positions.

    Declaration
    public static float GetDistance(Vector3 origin, Vector3 destination)
    Parameters
    Type Name Description
    Vector3 origin

    The origin.

    Vector3 destination

    The destination.

    Returns
    Type Description
    Single

    The distance

    | Improve this Doc View Source

    GetGroundHeight(Vector2)

    Gets the height of the ground at a given position.

    Declaration
    public static float GetGroundHeight(Vector2 position)
    Parameters
    Type Name Description
    Vector2 position

    The position.

    Returns
    Type Description
    Single

    The height measured in meters

    | Improve this Doc View Source

    GetGroundHeight(Vector3)

    Gets the height of the ground at a given position. Note : If the Vector3 is already below the ground, this will return 0. You may want to use the other overloaded function to be safe.

    Declaration
    public static float GetGroundHeight(Vector3 position)
    Parameters
    Type Name Description
    Vector3 position

    The position.

    Returns
    Type Description
    Single

    The height measured in meters

    | Improve this Doc View Source

    GetNearbyAnimatedBuildings(Vector3, Single)

    Declaration
    public static AnimatedBuilding[] GetNearbyAnimatedBuildings(Vector3 position, float radius)
    Parameters
    Type Name Description
    Vector3 position
    Single radius
    Returns
    Type Description
    AnimatedBuilding[]
    | Improve this Doc View Source

    GetNearbyBlips(Vector3, Single, BlipSprite[])

    Gets an array of all Blips in a given region in the World.

    Declaration
    public static Blip[] GetNearbyBlips(Vector3 position, float radius, params BlipSprite[] blipTypes)
    Parameters
    Type Name Description
    Vector3 position

    The position to check the Blip against.

    Single radius

    The maximum distance from the position to detect Blips.

    BlipSprite[] blipTypes

    The blip types to include, leave blank to get all Blips.

    Returns
    Type Description
    Blip[]
    | Improve this Doc View Source

    GetNearbyBuildings(Vector3, Single)

    Declaration
    public static Building[] GetNearbyBuildings(Vector3 position, float radius)
    Parameters
    Type Name Description
    Vector3 position
    Single radius
    Returns
    Type Description
    Building[]
    | Improve this Doc View Source

    GetNearbyEntities(Vector3, Single)

    Gets an array of all Entitys in a given region in the World.

    Declaration
    public static Entity[] GetNearbyEntities(Vector3 position, float radius)
    Parameters
    Type Name Description
    Vector3 position

    The position to check the Entity against.

    Single radius

    The maximun distance from the position to detect Entitys.

    Returns
    Type Description
    Entity[]
    | Improve this Doc View Source

    GetNearbyInteriorInstances(Vector3, Single)

    Declaration
    public static InteriorInstance[] GetNearbyInteriorInstances(Vector3 position, float radius)
    Parameters
    Type Name Description
    Vector3 position
    Single radius
    Returns
    Type Description
    InteriorInstance[]
    | Improve this Doc View Source

    GetNearbyInteriorProxies(Vector3, Single)

    Declaration
    public static InteriorProxy[] GetNearbyInteriorProxies(Vector3 position, float radius)
    Parameters
    Type Name Description
    Vector3 position
    Single radius
    Returns
    Type Description
    InteriorProxy[]
    | Improve this Doc View Source

    GetNearbyPeds(Vector3, Single, Model[])

    Gets an array of all Peds in a given region in the World.

    Declaration
    public static Ped[] GetNearbyPeds(Vector3 position, float radius, params Model[] models)
    Parameters
    Type Name Description
    Vector3 position

    The position to check the Ped against.

    Single radius

    The maximun distance from the position to detect Peds.

    Model[] models

    The Model of Peds to get, leave blank for all Ped Models.

    Returns
    Type Description
    Ped[]
    | Improve this Doc View Source

    GetNearbyPeds(Ped, Single, Model[])

    Gets an array of all Peds near a given Ped in the world

    Declaration
    public static Ped[] GetNearbyPeds(Ped ped, float radius, params Model[] models)
    Parameters
    Type Name Description
    Ped ped

    The ped to check.

    Single radius

    The maximun distance from the ped to detect Peds.

    Model[] models

    The Model of Peds to get, leave blank for all Ped Models.

    Returns
    Type Description
    Ped[]
    Remarks

    Doesnt include the ped in the result

    | Improve this Doc View Source

    GetNearbyPickupObjects(Vector3, Single)

    Gets an array of all Props in a given region in the World associated with a Pickup.

    Declaration
    public static Prop[] GetNearbyPickupObjects(Vector3 position, float radius)
    Parameters
    Type Name Description
    Vector3 position

    The position to check the Entity against.

    Single radius

    The maximun distance from the position to detect Props.

    Returns
    Type Description
    Prop[]
    | Improve this Doc View Source

    GetNearbyProjectiles(Vector3, Single)

    Gets an array of all Projectiles in a given region in the World.

    Declaration
    public static Projectile[] GetNearbyProjectiles(Vector3 position, float radius)
    Parameters
    Type Name Description
    Vector3 position

    The position to check the Projectile against.

    Single radius

    The maximum distance from the position to detect Projectiles.

    Returns
    Type Description
    Projectile[]
    | Improve this Doc View Source

    GetNearbyProps(Vector3, Single, Model[])

    Gets an array of all Props in a given region in the World.

    Declaration
    public static Prop[] GetNearbyProps(Vector3 position, float radius, params Model[] models)
    Parameters
    Type Name Description
    Vector3 position

    The position to check the Prop against.

    Single radius

    The maximun distance from the position to detect Props.

    Model[] models

    The Model of Props to get, leave blank for all Prop Models.

    Returns
    Type Description
    Prop[]
    | Improve this Doc View Source

    GetNearbyVehicles(Vector3, Single, Model[])

    Gets an array of all Vehicles in a given region in the World.

    Declaration
    public static Vehicle[] GetNearbyVehicles(Vector3 position, float radius, params Model[] models)
    Parameters
    Type Name Description
    Vector3 position

    The position to check the Vehicle against.

    Single radius

    The maximun distance from the position to detect Vehicles.

    Model[] models

    The Model of Vehicles to get, leave blank for all Vehicle Models.

    Returns
    Type Description
    Vehicle[]
    | Improve this Doc View Source

    GetNearbyVehicles(Ped, Single, Model[])

    Gets an array of all Vehicles near a given Ped in the world

    Declaration
    public static Vehicle[] GetNearbyVehicles(Ped ped, float radius, params Model[] models)
    Parameters
    Type Name Description
    Ped ped

    The ped to check.

    Single radius

    The maximun distance from the ped to detect Vehicles.

    Model[] models

    The Model of Vehicles to get, leave blank for all Vehicle Models.

    Returns
    Type Description
    Vehicle[]
    Remarks

    Doesnt include the Vehicle the ped is using in the result

    | Improve this Doc View Source

    GetNextPositionOnSidewalk(Vector2)

    Gets the next position on the street where a Ped can be placed.

    Declaration
    public static Vector3 GetNextPositionOnSidewalk(Vector2 position)
    Parameters
    Type Name Description
    Vector2 position

    The position to check around.

    Returns
    Type Description
    Vector3
    | Improve this Doc View Source

    GetNextPositionOnSidewalk(Vector3)

    Gets the next position on the street where a Ped can be placed.

    Declaration
    public static Vector3 GetNextPositionOnSidewalk(Vector3 position)
    Parameters
    Type Name Description
    Vector3 position

    The position to check around.

    Returns
    Type Description
    Vector3
    | Improve this Doc View Source

    GetNextPositionOnStreet(Vector2, Boolean)

    Gets the next position on the street where a Vehicle can be placed.

    Declaration
    public static Vector3 GetNextPositionOnStreet(Vector2 position, bool unoccupied = false)
    Parameters
    Type Name Description
    Vector2 position

    The position to check around.

    Boolean unoccupied

    if set to true only find positions that dont already have a vehicle in them.

    Returns
    Type Description
    Vector3
    | Improve this Doc View Source

    GetNextPositionOnStreet(Vector3, Boolean)

    Gets the next position on the street where a Vehicle can be placed.

    Declaration
    public static Vector3 GetNextPositionOnStreet(Vector3 position, bool unoccupied = false)
    Parameters
    Type Name Description
    Vector3 position

    The position to check around.

    Boolean unoccupied

    if set to true only find positions that dont already have a vehicle in them.

    Returns
    Type Description
    Vector3
    | Improve this Doc View Source

    GetSafeCoordForPed(Vector3, Boolean, Int32)

    Gets the nearest safe coordinate to position a Ped.

    Declaration
    public static Vector3 GetSafeCoordForPed(Vector3 position, bool sidewalk = true, int flags = 0)
    Parameters
    Type Name Description
    Vector3 position

    The position to check around.

    Boolean sidewalk

    if set to true Only find positions on the sidewalk.

    Int32 flags

    The flags.

    Returns
    Type Description
    Vector3
    | Improve this Doc View Source

    GetStreetName(Vector2)

    Determines the name of the street which is the closest to the given coordinates.

    Declaration
    public static string GetStreetName(Vector2 position)
    Parameters
    Type Name Description
    Vector2 position
    Returns
    Type Description
    String
    | Improve this Doc View Source

    GetStreetName(Vector3)

    Determines the name of the street which is the closest to the given coordinates.

    Declaration
    public static string GetStreetName(Vector3 position)
    Parameters
    Type Name Description
    Vector3 position
    Returns
    Type Description
    String
    | Improve this Doc View Source

    GetStreetName(Vector3, out String)

    Determines the name of the street which is the closest to the given coordinates.

    Declaration
    public static string GetStreetName(Vector3 position, out string crossingRoadName)
    Parameters
    Type Name Description
    Vector3 position

    The coordinates of the street

    String crossingRoadName

    If the coordinates are on an intersection, the name of the crossing road

    Returns
    Type Description
    String

    Returns the name of the street the coordinates are on.

    | Improve this Doc View Source

    GetZoneDisplayName(Vector2)

    Gets the display name of the a zone in the map. Use GetLocalizedString(String) to convert to the localized name.

    Declaration
    public static string GetZoneDisplayName(Vector2 position)
    Parameters
    Type Name Description
    Vector2 position

    The position on the map.

    Returns
    Type Description
    String
    | Improve this Doc View Source

    GetZoneDisplayName(Vector3)

    Gets the display name of the a zone in the map. Use GetLocalizedString(String) to convert to the localized name.

    Declaration
    public static string GetZoneDisplayName(Vector3 position)
    Parameters
    Type Name Description
    Vector3 position

    The position on the map.

    Returns
    Type Description
    String
    | Improve this Doc View Source

    GetZoneLocalizedName(Vector2)

    Gets the localized name of the a zone in the map.

    Declaration
    public static string GetZoneLocalizedName(Vector2 position)
    Parameters
    Type Name Description
    Vector2 position

    The position on the map.

    Returns
    Type Description
    String
    | Improve this Doc View Source

    GetZoneLocalizedName(Vector3)

    Gets the localized name of the a zone in the map.

    Declaration
    public static string GetZoneLocalizedName(Vector3 position)
    Parameters
    Type Name Description
    Vector3 position

    The position on the map.

    Returns
    Type Description
    String
    | Improve this Doc View Source

    PauseClock(Boolean)

    Pauses or resumes the in-game clock.

    Declaration
    [Obsolete("The World.PauseClock is obsolete, use World.IsClockPaused instead.")]
    public static void PauseClock(bool value)
    Parameters
    Type Name Description
    Boolean value

    Pauses the game clock if set to true; otherwise, resumes the game clock.

    | Improve this Doc View Source

    Raycast(Vector3, Vector3, IntersectFlags, Entity)

    Creates a raycast between 2 points.

    Declaration
    public static RaycastResult Raycast(Vector3 source, Vector3 target, IntersectFlags options, Entity ignoreEntity = null)
    Parameters
    Type Name Description
    Vector3 source

    The source of the raycast.

    Vector3 target

    The target of the raycast.

    IntersectFlags options

    What type of objects the raycast should intersect with.

    Entity ignoreEntity

    Specify an Entity that the raycast should ignore, leave null for no entities ignored.

    Returns
    Type Description
    RaycastResult
    | Improve this Doc View Source

    Raycast(Vector3, Vector3, Single, IntersectFlags, Entity)

    Creates a raycast between 2 points.

    Declaration
    public static RaycastResult Raycast(Vector3 source, Vector3 direction, float maxDistance, IntersectFlags options, Entity ignoreEntity = null)
    Parameters
    Type Name Description
    Vector3 source

    The source of the raycast.

    Vector3 direction

    The direction of the raycast.

    Single maxDistance

    How far the raycast should go out to.

    IntersectFlags options

    What type of objects the raycast should intersect with.

    Entity ignoreEntity

    Specify an Entity that the raycast should ignore, leave null for no entities ignored.

    Returns
    Type Description
    RaycastResult
    | Improve this Doc View Source

    RaycastCapsule(Vector3, Vector3, Single, IntersectFlags, Entity)

    Creates a 3D raycast between 2 points.

    Declaration
    public static RaycastResult RaycastCapsule(Vector3 source, Vector3 target, float radius, IntersectFlags options, Entity ignoreEntity = null)
    Parameters
    Type Name Description
    Vector3 source

    The source of the raycast.

    Vector3 target

    The target of the raycast.

    Single radius

    The radius of the raycast.

    IntersectFlags options

    What type of objects the raycast should intersect with.

    Entity ignoreEntity

    Specify an Entity that the raycast should ignore, leave null for no entities ignored.

    Returns
    Type Description
    RaycastResult
    | Improve this Doc View Source

    RaycastCapsule(Vector3, Vector3, Single, Single, IntersectFlags, Entity)

    Creates a 3D raycast between 2 points.

    Declaration
    public static RaycastResult RaycastCapsule(Vector3 source, Vector3 direction, float maxDistance, float radius, IntersectFlags options, Entity ignoreEntity = null)
    Parameters
    Type Name Description
    Vector3 source

    The source of the raycast.

    Vector3 direction

    The direction of the raycast.

    Single maxDistance

    How far the raycast should go out to.

    Single radius

    The radius of the raycast.

    IntersectFlags options

    What type of objects the raycast should intersect with.

    Entity ignoreEntity

    Specify an Entity that the raycast should ignore, leave null for no entities ignored.

    Returns
    Type Description
    RaycastResult
    | Improve this Doc View Source

    RemoveAllParticleEffectsInRange(Vector3, Single)

    Stops all particle effects in a range.

    Declaration
    public static void RemoveAllParticleEffectsInRange(Vector3 pos, float range)
    Parameters
    Type Name Description
    Vector3 pos

    The position in the world to stop particle effects.

    Single range

    The maximum distance from the pos to stop particle effects.

    | Improve this Doc View Source

    RemoveWaypoint()

    Removes the waypoint.

    Declaration
    public static void RemoveWaypoint()
    | Improve this Doc View Source

    ShootBullet(Vector3, Vector3, Ped, WeaponAsset, Int32, Single)

    Fires a single bullet in the world

    Declaration
    public static void ShootBullet(Vector3 sourcePosition, Vector3 targetPosition, Ped owner, WeaponAsset weaponAsset, int damage, float speed = -1F)
    Parameters
    Type Name Description
    Vector3 sourcePosition

    Where the bullet is fired from.

    Vector3 targetPosition

    Where the bullet is fired to.

    Ped owner

    The Ped who fired the bullet, leave null for no one.

    WeaponAsset weaponAsset

    The weapon that the bullet is fired from.

    Int32 damage

    The damage the bullet will cause.

    Single speed

    The speed, only affects projectile weapons, leave -1 for default.

    | Improve this Doc View Source

    TransitionToWeather(Weather, Single)

    Transitions to weather.

    Declaration
    public static void TransitionToWeather(Weather weather, float duration)
    Parameters
    Type Name Description
    Weather weather

    The weather.

    Single duration

    The duration.

    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX