Rage Namespace

RAGE Plugin Hook Documentation

[This is preliminary documentation and is subject to change.]

The base namespace for the API provided by RAGE Plugin Hook.
Classes

  ClassDescription
Public classAdvancedPoolEnumeratorHT
Public classAnimationTask
Represents an animation task. This class cannot be inherited.
Public classBlip

Represents a Blip in the game world.

Blips are used to mark entities of interest in either the game world, on the radar or both.

Public classBuilding
Represents a building in the game world.
Public classCamera
Public classCode exampleCleanupManager

Class for cleaning up IDeletables.

Examples

The following example spawns a car, and deletes it 3 seconds after it's been destroyed. The CleanupManager removes the IDeletables that's been added to it, when it gets disposed.
C#
using(CleanupManager cleanupManager = new CleanupManager())
{
    Vector3 spawnPosition = playerVehicle.GetOffsetPosition(new Vector3(-3f, 7f, 0f));
    Vehicle car = new Vehicle("POLICE2", spawnPosition, playerVehicle.Heading);
    cleanupManager.Add(car);
    while (!car.IsDead)
    {
        GameFiber.Yield();
    }

    GameFiber.Sleep(3000);
}
Public classConsoleCommandExecutedEventArgs
Provides data for the [!:ConsoleCommand::Executed] event
Public classCryptographyHelper
A helper class for cryptography.
Public classDebug
A collection of methods for debugging.
Public classEmergencyLight
Public classEmergencyLighting
Specifies settings for emergency lighting on vehicles. This class cannot be inherited.
Public classEntity
Represents an entity in the game world.
Public classFire
Represents a fire.
Public classGame
Static class for various game settings and functions.
Public classGameConsole
Provides access to the console of the hook.
Public classGameFiber
Represents a multi-tasking fiber. Natives can only be invoked from a fiber. Not meant to be inherited.
Public classGraphics
Public classGraphicsEventArgs
Provides data for the FrameRender event.
Public classGroup

Represents a group of Ped.

There can be up to 16 groups at any given time.

Empty groups are automatically deleted.

Public classGroupFormation
Gets the formation info about this group.
Public classHandlingData
Public classInitializationFile
Public classInteriorHelper
Public classInternetTime

Class for getting the current time from the Internet.

This class uses the TIME protocol to get the current time from nist1-macon.macon.ga.us.

Public classKeyboardLayoutCustom
Public classKeyboardLayoutKeyDefinition
Public classKeyboardState
Public classKeyEventArgs
Public classMathHelper
Static class with various functions for common conversions.
Public classMetadataObject
Public classMouseState
Public classObject
Represents an object in the game world.
Public classObjectPoolEnumerator
Public classOnscreenPromptButtonClickedEventArgs
Public classOperatingSystemInfo
Public classPed
Represents a character in the game world.
Public classPedInventory
Public classPedPoolEnumerator
Public classPedRunOverEventArgs
Provides data for events of peds getting run over.
Public classPedShotEventArgs
Provides data for events of peds getting shot.
Public classPlayer
Represents a player.
Public classPoolEnumeratorHT
Public classSimplePoolEnumeratorHT
Public classSpatialEventArgs
Provides data for spatial events.
Public classStaticFinalizer
Public classTask
Represents a task. This class cannot be inherited.
Public classTaskInvoker
Public classTaskSequence
This class allows executing multiple tasks on a Ped in sequence.
Public classTexture
Public classVehicle
Represents a vehicle in the game world.
Public classVehicleDoor
Public classVehicleModder
Public classVehiclePoolEnumerator
Public classVehicleWheel
Public classVehicleWindow
Public classWeapon
Public classWeaponDescriptor
Public classWeaponDescriptorCollection
Public classWorld
Static class for various game world settings and functions.
Structures

  StructureDescription
Public structureAnimationDictionary
Represents an animation dictionary.
Public structureAnimationSet
Public structureDecisionMaker
Public structureHitResult
Struct representing the result of a ray trace.
Public structureMatrix
Defines a 4x4 matrix.
Public structureModel
Public structurePoolHandle

Represents the handle of an item in a pool.

The RAGE engine has a special array type known as a pool.
Pools are widely used throughout RAGE games to store things like Peds, Vehicles, Weapons, Blips, etc.
Pools consist of slots, and each slot has an index ranging from 0 to the pools capacity.
Essentially each slot has a flag that indicates whether the slot is free, and a counter. The counter is purely to avoid duplicate handles in case that same slot is reused immediately after it's freed.
The handle is a composite number (32-bit unsigned integer) where the 24 most significant bits represent the item's index into the pool, and the last 8 bits represent the counter.
Eg. if an item is stored at index 4 and its counter is 7, the handle would be (4 << 8) | 7 = 1031 (0x00000407).
A handle is validated by comparing its counter to the counter in the slot indicated by the index in the handle. If the slot is occupied and the counters match, the handle is valid. These handles are used extensively in the engine's internal scripting system. If a native function takes an entity as parameter, it is by its handle.

Public structureQuaternion
Defines a four dimensional mathematical quaternion.
Public structureRelationshipGroup
Represents a relationship group.
Public structureRotator
Represents a rotation.
Public structureVector2
Defines a two component vector.
Public structureVector3
Defines a three component vector.
Public structureVector4
Defines a four component vector.
Public structureVehicleDoorPropertyWrapper
Public structureVehicleWheelPropertyWrapper
Public structureVehicleWindowPropertyWrapper
Public structureWeaponAsset
Interfaces

  InterfaceDescription
Public interfaceIAddressable
Represents an object that has an address.
Public interfaceIAsset
Represents a game asset. Game assets are blueprints that describe an object. For example, a weapon asset specifies what model a weapon will use, how fast it shoots, how many bullets it has, etc.
Public interfaceIBurnable
Represents an object that can burn.
Public interfaceIDeletable
Represents an object that can be deleted.
Public interfaceIDirectional
Represents an object that has a direction.
Public interfaceIFreezable
Represents an object that can be frozen. Frozen objects will not be processed by the physics engine.
Public interfaceIHandleable
Represents an object in a pool.
Public interfaceIHashedAsset
Represents a game asset. Game assets are blueprints that describe an object. For example, a weapon asset specifies what model a weapon will use, how fast it shoots, how many bullets it has, etc.
Public interfaceIKeyboardLayout
Public interfaceINamedAsset
Represents a game asset. Game assets are blueprints that describe an object. For example, a weapon asset specifies what model a weapon will use, how fast it shoots, how many bullets it has, etc.
Public interfaceIPersistable
Represents an object that can become persistent within the game world. Persistent objects will not be removed automatically during clean ups.
Public interfaceIRenderable
Represents an object that can be rendered in the game world.
Public interfaceIRotatable
Represents an object that can be rotated.
Public interfaceISpatial
Represents an object that has a position.
Public interfaceIVisual
Represents an object that can be hidden in the game world.
Enumerations

  EnumerationDescription
Public enumerationAchievement
Represents the game's achievements.
Public enumerationAnimationFlags
Public enumerationAxis
Specifies an axis.
Public enumerationBlipSprite
Public enumerationCameraState
Public enumerationControllerButtons
Public enumerationEnterVehicleFlags
Flags for the [!:TaskInvoker::EnterVehicle] task.
Public enumerationExitCoverTaskFlags
Flags for the [!:TaskInvoker::ExitCover] task.
Public enumerationFiringPattern
Public enumerationGameControl
Public enumerationGetEntitiesFlags
Public enumerationGraphicsDrawCall
Public enumerationGroupFormationType
Represents the various group formation types.
Public enumerationHelmetTypes
The various helmet types.
Public enumerationLeaveVehicleFlags
Flags for the [!:Rage::TaskInvoker::LeaveVehicle] task.
Public enumerationLicensePlateStyle
Public enumerationLicensePlateType
Public enumerationParachuteLandingType
Represents the various landing types.
Public enumerationParachuteState
Represents the various parachute states.
Public enumerationPedBoneId
Public enumerationRadioStation
Public enumerationRageGameType
Public enumerationRelationship
Represents the relationships between relationship groups.
Public enumerationSpeechModifier
Public enumerationTaskStatus
Indicates the status of a task.
Public enumerationTraceFlags
Public enumerationVehicleClass
Public enumerationVehicleComponents
Public enumerationVehicleConvertibleRoofState
Represents the state of the convertible roof of a vehicle.
Public enumerationVehicleDrivingFlags
Flags for driving tasks.
Public enumerationVehicleIndicatorLightsStatus
Represents the status of vehicle indicator lights.
Public enumerationVehicleLockStatus
Represents the status of vehicle locks.
Public enumerationVehicleManeuver
Represents the possible driving maneuvers for [!:Rage::TaskInvoker::PerformDrivingManeuver].
Public enumerationVehicleModType
Public enumerationVehicleType
Public enumerationVehicleWheelType
Public enumerationWeaponHash
Public enumerationWeaponState
Public enumerationWeatherType
Public enumerationWindowsEdition
Public enumerationWindowsVersion