Ui::customMinimapSetBlipObject: Difference between revisions

From RAGE Multiplayer Wiki
(Created page with " {{ClientsideJsFunction}} {{JSContainer| ===Required Params=== *'''spriteId:''' {{RageType|number}} ===Return value=== *''' {{RageType|void}} ''' ==Syntax== <syntaxhighlight lang="javascript"> mp.game.ui.customMinimapSetBlipObject(spriteId) </syntaxhighlight> ==Example== <syntaxhighlight lang="javascript"> //todo </syntaxhighlight> }} ==See also== {{Ui_functions_c}} Category:Clientside API Category:TODO: Example")
 
No edit summary
 
Line 1: Line 1:
{{ClientsideJsFunction}}
{{ClientsideJsFunction}}
{{JSContainer|
{{JSContainer|
==Explanation==
This function allows setting a custom sprite as the main blip icon on the minimap, replacing the default player marker. You can specify a `spriteId` to represent different icons on the minimap, which can be useful for changing the minimap icon based on the player’s status or role.


===Required Params===
===Required Params===
*'''spriteId:''' {{RageType|number}}
*'''spriteId:''' {{RageType|number}} - The ID of the sprite to use as the minimap blip.


===Return value===
===Return value===
Line 15: Line 17:


==Example==
==Example==
The following example sets a custom minimap icon:
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">
//todo
mp.game.ui.customMinimapSetBlipObject(123); // Replace with desired sprite ID
</syntaxhighlight>
</syntaxhighlight>
}}
}}

Latest revision as of 19:00, 5 November 2024

Client-Side
Function

 JavaScript



JavaScript Syntax


Explanation

This function allows setting a custom sprite as the main blip icon on the minimap, replacing the default player marker. You can specify a `spriteId` to represent different icons on the minimap, which can be useful for changing the minimap icon based on the player’s status or role.

Required Params

  • spriteId: number - The ID of the sprite to use as the minimap blip.

Return value

  • void

Syntax

mp.game.ui.customMinimapSetBlipObject(spriteId)

Example

The following example sets a custom minimap icon:

mp.game.ui.customMinimapSetBlipObject(123); // Replace with desired sprite ID


See also