Learn how to add or remove custom icons from an entity's lock-on prompt (focus prompt) using RedM natives.
This snippet demonstrates attaching a custom icon to entities such as horses, NPCs, wagons, or objects, making it perfect for custom interactions, jobs, and immersive gameplay systems.
---------------------------------------------------------------------
-- Natives
---------------------------------------------------------------------
local ADD_LOCKON_PROMPT_ICON = 0x7563CBCA99253D1A
local GET_MOUNT = 0x0501D52D24EA8934
---------------------------------------------------------------------
-- Example
---------------------------------------------------------------------
RegisterCommand("addblip", function()
-- Get the player's current horse
local horse = Citizen.InvokeNative(
GET_MOUNT,
PlayerId(),
Citizen.ResultAsInteger()
)
if horse == 0 or not DoesEntityExist(horse) then
print("No nearby horse found.")
return
end
-- Add a custom lock-on prompt icon
Citizen.InvokeNative(
ADD_LOCKON_PROMPT_ICON,
horse,
joaat("blip_horse_owned_bonding_3")
)
end, false)icons or blips can be found here