mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-06-18 23:17:52 +08:00
23 lines
580 B
C++
23 lines
580 B
C++
![]() |
#pragma once
|
||
|
#include "gta/enums.hpp"
|
||
|
#include "natives.hpp"
|
||
|
#include "script.hpp"
|
||
|
|
||
|
namespace big::blip
|
||
|
{
|
||
|
inline bool get_blip_location(Vector3 &location, int sprite, int color = -1)
|
||
|
{
|
||
|
Blip blip;
|
||
|
for (blip = HUD::GET_FIRST_BLIP_INFO_ID(sprite);
|
||
|
HUD::DOES_BLIP_EXIST(blip) &&
|
||
|
color != -1 && HUD::GET_BLIP_COLOUR(blip);
|
||
|
blip = HUD::GET_NEXT_BLIP_INFO_ID(sprite)
|
||
|
) script::get_current()->yield();
|
||
|
|
||
|
if (!HUD::DOES_BLIP_EXIST(blip) || (color != -1 && HUD::GET_BLIP_COLOUR(blip) != color)) return false;
|
||
|
|
||
|
location = HUD::GET_BLIP_COORDS(blip);
|
||
|
|
||
|
return true;
|
||
|
}
|
||
|
}
|