- Documentation
- Client functions
- engineReplaceBlipIcon
Function
engineReplaceBlipIcon
Replaces the image of a game blip icon (number 0-63, e.g. 40) with your own image. The image is a resource file (PNG, JPG, BMP or GIF, listed in meta.xml as <file>, also :resource/file.png) or image data, e.g. read with fileRead. The new icon shows everywhere the game draws that number: on the radar, on the ESC menu map and in its legend. Blips with that icon keep working the same way (mouse hover, names, ordering). A square image with a transparent background works best; anything larger than 256 px is scaled down. When the resource stops, the game icon comes back.
Syntax
bool engineReplaceBlipIcon(int iconID, string image)Arguments
iconIDint- Blip icon number 0-63 (as in
createBlip). imagestring- Path of an image file in the resource or image data.
Returns
true on success; on failure false and the reason.
Example
-- ikona 40 na radarze i mapie ESC = nasz plik
engineReplaceBlipIcon(40, "ikony/sklep.png")
See also
engineRestoreBlipIconRestores the game icon afterengineReplaceBlipIcon. Without an argument it restores every icon replaced by this resource.isBlipIconReplacedChecks whether the blip icon with this number has a custom image fromengineReplaceBlipIcon.createBlipCreates a blip, an icon on the radar and map, at the given point.