Skip to content

Conversation

Identity-labs
Copy link
Contributor

…lipSprite, GetBlipRotation, GetBlipModifiers

Goal of this PR

This PR adds new RedM (RDR3) blip-related natives to enhance script functionality for blip manipulation and inspection. The implementation provides direct access to blip data structures through the game pool system, enabling scripts to retrieve blip properties like sprite, rotation, and modifiers that were previously inaccessible.

Usage :

  • With GamePool native we can get POI blip created by player on the map filtered by Sprite (BLIP_POI) or Modifiers (BLIP_STYLE_POI)
  • With Modifiers we can also get the selected state of a blip on the map (BLIP_MODIFIER_SELECTED_UP_SCALE )

How is this PR achieving the goal

Core Implementation:
Added BlipNatives.cpp with three main natives:
GET_BLIP_SPRITE: Retrieves the sprite/hash of a blip from its handle
GET_BLIP_ROTATION: Gets the rotation of a blip in degrees (0.0-360.0)
GET_BLIP_MODIFIERS: Returns an array of blip modifiers

Technical Details:
Implemented direct memory access to the fwuiBlip pool using rage::GetPoolBase()
Created a BlipData struct mapping the internal blip memory layout with proper padding
Added proper error handling for invalid blip handles
Used fx::SerializeObject() for returning modifier arrays to scripts
Added comprehensive native documentation with usage examples

This PR applies to the following area(s)

RedM: Client-side native functions
ScRT: Lua: Enhanced blip functionality for Lua scripts
ScRT: JS: Enhanced blip functionality for JavaScript scripts

Successfully tested on

Game builds: RedM (RDR3)
Platforms: Windows

Checklist

  • [ x] Code compiles and has been tested successfully.
  • [ x] Code explains itself well and/or is documented.
  • [ x] My commit message explains what the changes do and what they are for.
  • [ x] No extra compilation warnings are added by these changes.

…lipSprite, GetBlipRotation, GetBlipModifiers
@github-actions github-actions bot added the invalid Requires changes before it's considered valid and can be (re)triaged label Oct 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

invalid Requires changes before it's considered valid and can be (re)triaged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant