🌐
MFPSCRIPTS- Documentation
  • πŸ”Documentation
  • 🐌Scripts
    • πŸ“±PhoneBattery
      • βš™οΈInstallation
      • ☎️Addidtional Phones
        • πŸ“±RoadPhone
        • πŸ“±GCPhone
        • πŸ“±HighPhone
        • πŸ“±D-Phone
        • πŸ“±NPWD
    • πŸ’ΈBanking
      • βš™οΈInstallation
    • πŸš”Policejob
      • βš™οΈInstallation
      • πŸ”—Script Intergrations
      • πŸ‘¨β€πŸ’»Developers
    • 🚧Progressbar
    • ℹ️Notification
    • πŸ—‘οΈScrapyard
    • 🎬HUD
    • πŸ“²Dispatches-App for LB-Phone
    • πŸ—ΊοΈMFP_AdvancedBlips
  • πŸ₯©Additional
    • βš™οΈINSTALL SCRIPTS
    • πŸ“΄FiveStatus
  • 🚫General Errors
    • πŸ“€es_extended
Powered by GitBook
On this page
  • Preview
  • Installation
  • Exports
  • Usage
  • IMPORTANT
  • πŸ’Έ EXAMPLE USED IN MFP_Banking
  1. Scripts

MFP_AdvancedBlips

This is AdvancedBlips for your scripts. Free to use for all creators!

PreviousDispatches-App for LB-PhoneNextINSTALL SCRIPTS

Last updated 1 year ago

WE DONT PROVIDE ANY SUPPORT OF THIS TO USE. ITS A DEVELOPER RESOURCE NOT MEANT FOR PEOPLE WITHOUT DEV-KNOWLEDGE!

FEEL FREE TO INTEGRATE IN YOUR SCRIPTS!

Preview

Installation

Add this in your server.cfg above the resource using exports:

start mfp_blips 
start UR-RESOURCE

Exports

ResetBlipInfo(blip): Clears all blip information and disables the information popup when selected.

SetBlipInfoTitle(blip, title, rockstarVerified): Defines the title for the information popup and toggles the Rockstar-verified icon.

SetBlipInfoImage(blip, dict, tex): Sets the header image for the information popup.

SetBlipInfoEconomy(blip, rp, money): Customizes the visual representation for RP and Money in the popup. Empty strings disable the respective icons.

AddBlipInfoText(blip, leftText, rightText): Appends a line of text to the information popup.

AddBlipInfoName(blip, leftText, rightText): Appends a line of text to the information popup, with the right text appearing in bold.

AddBlipInfoHeader(blip, leftText, rightText): Appends a line to the information popup, including a separator between this line and the previous one.

AddBlipInfoIcon(blip, leftText, rightText, iconId, iconColor, checked): Appends a line to the information popup, incorporating a blip icon. The iconId can range from 0 to 25, and iconColor appears to match with blip colors.

SetBlipInfo(blip, infoData): Sets the raw information data for advanced usage.

Usage

exports['mfp_blips']:SetBlipInfoImage(blip, "texturename", "imagename") -- like imagename from imagename.dds or .jpeg, texturename from texturename.ytd. Dont insert formates!
exports['mfp_blips']:SetBlipInfoTitle(blip, "Title", true)
exports['mfp_blips']:SetBlipInfoEconomy(blip, "1 123", "4552")
exports['mfp_blips']:AddBlipInfoText(blip, "Text", "Your Text")
exports['mfp_blips']:AddBlipInfoName(blip, "Name", "mfpscripts.com")
exports['mfp_blips']:AddBlipInfoHeader(blip, "Header", "This is my own text")
exports['mfp_blips']:AddBlipInfoIcon(blip, "Blip", "Suit -->", 16, 0, true)

IMPORTANT

If you want to use banner img make sure to stream the texture first! You need this inside your code when you want to use this

RequestStreamedTextureDict("texturename", 1)
while not HasStreamedTextureDictLoaded("texturename") do
    Wait(0)
end

You need to have a texturename.ytd in a stream folder in your resource. In this texturefile is your image locaded by default its dds, you can use openiv to just drag and drop a jpeg or png and its automaticly converted! After this just ad following to your handfull exports:

exports['mfp_blips']:SetBlipInfoImage(blip, "texturename", "imagename") 
-- like imagename from imagename.dds or .jpeg, texturename from texturename.ytd. 
-- Dont insert formates!
Citizen.CreateThread(function()
	if not Config.EnableBlips then return end
	
	RequestStreamedTextureDict("banking_banner", 1)
    while not HasStreamedTextureDictLoaded("banking_banner") do
        Wait(0)
    end

	for _, BankLocations in pairs(Config.BankLocations) do
		BankLocations.blip = AddBlipForCoord(BankLocations.x, BankLocations.y, BankLocations.z)
		SetBlipSprite(BankLocations.blip, 108)
		SetBlipDisplay(BankLocations.blip, 4)
		SetBlipScale(BankLocations.blip, 0.9)
		SetBlipColour(BankLocations.blip, 0)
		SetBlipAsShortRange(BankLocations.blip, true)
		BeginTextCommandSetBlipName("STRING")
		AddTextComponentString(Translation[Config.Locale]['atm_blip'])
		EndTextCommandSetBlipName(BankLocations.blip)
		if Config.usingAdvancedBlips then
			exports['mfp_blips']:SetBlipInfoTitle(BankLocations.blip, Translation[Config.Locale]['atm_blip'], false)
			exports['mfp_blips']:SetBlipInfoImage(BankLocations.blip, "banking_banner", "fleeca")
			exports['mfp_blips']:AddBlipInfoText(BankLocations.blip, Translation[Config.Locale]['times1_blip'], Translation[Config.Locale]['times2_blip'])
			exports['mfp_blips']:AddBlipInfoText(BankLocations.blip, Translation[Config.Locale]['withdraw_blip'], Translation[Config.Locale]['yes_blip'])
			exports['mfp_blips']:AddBlipInfoText(BankLocations.blip, Translation[Config.Locale]['sendmoney_blip'], Translation[Config.Locale]['yes_blip'])
			exports['mfp_blips']:AddBlipInfoText(BankLocations.blip, Translation[Config.Locale]['employees_blip'], Translation[Config.Locale]['employees_amount_blip'])
			exports['mfp_blips']:AddBlipInfoText(BankLocations.blip, Translation[Config.Locale]['place_blip'], Translation[Config.Locale]['place2_blip'])
			exports['mfp_blips']:AddBlipInfoHeader(BankLocations.blip, "") -- Empty header adds the header line
			exports['mfp_blips']:AddBlipInfoText(BankLocations.blip, Translation[Config.Locale]['disc_blip'])
		end
	end
end)

Thats it!

πŸ’Έ EXAMPLE USED IN

MFP_Banking
🐌
πŸ—ΊοΈ
Screenshot from MFP_Banking-Blip
Page cover image