Skip to content

Commit

Permalink
Merge pull request #92 from ollymonger/chore/august-24-add-blip-group…
Browse files Browse the repository at this point in the history
…-typings

chore: Add Blip Category API typings
  • Loading branch information
shr0x authored Aug 19, 2024
2 parents 07b805b + af42a1e commit c09cd5f
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions packages/client/game/hud.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -866,6 +866,44 @@ declare interface GameHud extends GameHudLegacy {
enableDeathbloodSeethrough(p1: number): void;
endTextComponent(): void;
unk: GameHudUnk;

/**
* This method will set a blip category priority.
* @param category
* @param priority
* @example
* //create a blip
* let policeBlip = mp.blips.new(60, new mp.Vector3(427.95, -981.05, 0), {
* name: 'Los Santos Police Station',
* color: 3,
* shortRange: true,
* });
* //set blip category to 60
* policeBlip.setCategory(60);
* //make sure 60 is a grouped category.
* mp.game.ui.setBlipCategoryGrouped(60, true);
* //set blip category 60 priority to 0
* mp.game.ui.setBlipCategoryPriority(60, 0);
*/
setBlipCategoryPriority(category: number, priority: number): void;

/**
* This method will set a blip into a category.
* @param category
* @param placeIn
* @example
* //create a blip
* let policeBlip = mp.blips.new(60, new mp.Vector3(427.95, -981.05, 0), {
* name: 'Los Santos Police Station',
* color: 3,
* shortRange: true,
* });
* //set blip category to 60
* policeBlip.setCategory(60);
* //make sure 60 is a grouped category.
* mp.game.ui.setBlipCategoryGrouped(60, true);
*/
setBlipCategoryGrouped(category: number, priority: boolean): void;
}

interface GameHudMp extends GameHud { }

0 comments on commit c09cd5f

Please sign in to comment.