Ui::addTextComponentSubstringPlayerName
� Description :
Processes a string and removes the player name(max len 99)
You can use this function to create notifications/subtitles
--------------------------------------------------------------------
� Usage(Colors) :
~r~ = red
~y~ = yellow
~g~ = green
~b~ = light blue
~w~ = white
~p~ = purple
~n~ = new line
--------------------------------------------------------------------
� Example (C++):
void ShowNotification(char *text)
{
UI::_SET_NOTIFICATION_TEXT_ENTRY('STRING');
UI::ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME(text);
UI::_DRAW_NOTIFICATION(FALSE, FALSE); // if first param = 1, the message flashes 1 or 2 times
}
� Colors example :
string red = '~r~Red test';
string white_and_yellow = '~w~White and ~y~yellow';
string text_with_double_line = 'First line.~n~Second line';
You can also call fonts which are defined in: common/data/ui/fontmap.xml, along with 'html' style colours and font sizes, see example below
This native (along with 0x5F68520888E69014 and 0x94CF4AC034C9C986) do not actually filter anything. They simply add the provided text (as of 944)
Syntax
mp.game.ui.addTextComponentSubstringPlayerName(text);Required Arguments
- text: String
Return value
- Undefined
Example
mp.game.ui.addTextComponentSubstringPlayerName(`<font face="ChaletComprime-CologneSixty" size="16" color="rgb(123,213,123)">font</font> renders fine`);See also
- mp.game.ui.activateFrontendMenu
- mp.game.ui.addBlipForCoord
- mp.game.ui.addBlipForPickup
- mp.game.ui.addBlipForRadius
- mp.game.ui.addNextMessageToPreviousBriefs
- mp.game.ui.addTextComponentFloat
- mp.game.ui.addTextComponentInteger
- mp.game.ui.addTextComponentItemString
- mp.game.ui.addTextComponentSubstringCash
- mp.game.ui.addTextComponentSubstringLocalized
- mp.game.ui.addTextComponentSubstringPlayerName
- mp.game.ui.addTextComponentSubstringTime
- mp.game.ui.addTextComponentSubstringWebsite
- mp.game.ui.addTrevorRandomModifier
- mp.game.ui.beginTextCommandSetBlipName
- mp.game.ui.clearAdditionalText
- mp.game.ui.clearFloatingHelp
- mp.game.ui.clearHelp
- mp.game.ui.clearThisPrint
- mp.game.ui.displayAmmoThisFrame
- mp.game.ui.displayAreaName
- mp.game.ui.displayCash
- mp.game.ui.displayHelpTextFromStringLabel
- mp.game.ui.displayHelpTextThisFrame
- mp.game.ui.displayHud
- mp.game.ui.displayRadar
- mp.game.ui.doesTextBlockExist
- mp.game.ui.doesTextLabelExist
- mp.game.ui.drawNotification2
- mp.game.ui.drawNotification3
- mp.game.ui.drawNotification4
- mp.game.ui.drawNotification
- mp.game.ui.drawSubtitleTimed
- mp.game.ui.drawText
- mp.game.ui.enableDeathbloodSeethrough
- mp.game.ui.flashAbilityBar
- mp.game.ui.flashWantedDisplay
- mp.game.ui.getBlipInfoIdCoord
- mp.game.ui.getHudColour
- mp.game.ui.getHudComponentPosition
- mp.game.ui.getLabelText
- mp.game.ui.getLengthOfLiteralString
- mp.game.ui.getLengthOfStringWithThisTextLabel
- mp.game.ui.getNamedRendertargetRenderId
- mp.game.ui.getStreetNameFromHashKey
- mp.game.ui.getTextScaleHeight
- mp.game.ui.getTextScreenWidth
- mp.game.ui.getTextSubstringSafe
- mp.game.ui.getTextSubstringSlice
- mp.game.ui.getTextSubstring
- mp.game.ui.hasAdditionalTextLoaded
- mp.game.ui.hasHeadDisplayLoaded
- mp.game.ui.hasThisAdditionalTextLoaded
- mp.game.ui.hideHudComponentThisFrame
- mp.game.ui.hideScriptedHudComponentThisFrame
- mp.game.ui.hideSpecialAbilityLockonOperation
- mp.game.ui.isHudComponentActive
- mp.game.ui.isMinimapAreaRevealed
- mp.game.ui.isNamedRendertargetLinked
- mp.game.ui.isNamedRendertargetRegistered
- mp.game.ui.isPauseMenuActive
- mp.game.ui.isScriptedHudComponentActive
- mp.game.ui.isStreamingAdditionalText
- mp.game.ui.keyHudColour
- mp.game.ui.linkNamedRendertarget
- mp.game.ui.lockMinimapAngle
- mp.game.ui.lockMinimapPosition
- mp.game.ui.objectDecalToggle
- mp.game.ui.registerNamedRendertarget
- mp.game.ui.releaseNamedRendertarget
- mp.game.ui.removeBlip
- mp.game.ui.removeNotification
- mp.game.ui.requestAdditionalText2
- mp.game.ui.requestAdditionalText
- mp.game.ui.resetHudComponentValues
- mp.game.ui.respondingAsTemp
- mp.game.ui.restartFrontendMenu
- mp.game.ui.setAbilityBarValue
- mp.game.ui.setCursorSprite
- mp.game.ui.setFrontendActive
- mp.game.ui.setGpsFlags
- mp.game.ui.setGpsFlashes
- mp.game.ui.setHeadDisplayFlag
- mp.game.ui.setHeadDisplayString
- mp.game.ui.setHeadDisplayWanted
- mp.game.ui.setHudColour
- mp.game.ui.setHudComponentPosition
- mp.game.ui.setLoadingPromptTextEntry
- mp.game.ui.setMinimapAttitudeIndicatorLevel
- mp.game.ui.setMinimapBlockWaypoint
- mp.game.ui.setMinimapComponent
- mp.game.ui.setMinimapRevealed
- mp.game.ui.setMinimapVisible
- mp.game.ui.setMissionName
- mp.game.ui.setMultiplayerHudCash
- mp.game.ui.setNewWaypoint
- mp.game.ui.setNotificationFlashColor
- mp.game.ui.setNotificationMessageClanTag2
- mp.game.ui.setNotificationMessageClanTag
- mp.game.ui.setNotificationMessage
- mp.game.ui.setNotificationTextEntry
- mp.game.ui.setPauseMenuActive
- mp.game.ui.setPlayerBlipPositionThisFrame
- mp.game.ui.setPlayerCashChange
- mp.game.ui.setRadarAsInteriorThisFrame
- mp.game.ui.setRadarBigmapEnabled
- mp.game.ui.setRadarZoomLevelThisFrame
- mp.game.ui.setRadarZoom
- mp.game.ui.setTextCentre
- mp.game.ui.setTextChatUnk
- mp.game.ui.setTextColour
- mp.game.ui.setTextComponentFormat
- mp.game.ui.setTextDropshadow
- mp.game.ui.setTextEdge
- mp.game.ui.setTextEntry2
- mp.game.ui.setTextEntryForWidth
- mp.game.ui.setTextEntry
- mp.game.ui.setTextFont
- mp.game.ui.setTextGxtEntry
- mp.game.ui.setTextJustification
- mp.game.ui.setTextLeading
- mp.game.ui.setTextProportional
- mp.game.ui.setTextRenderId
- mp.game.ui.setTextRightJustify
- mp.game.ui.setTextScale
- mp.game.ui.setTextWrap
- mp.game.ui.setUseridsUihidden
- mp.game.ui.setWarningMessage2
- mp.game.ui.setWarningMessage3
- mp.game.ui.setWarningMessage
- mp.game.ui.setWidescreenFormat
- mp.game.ui.showHudComponentThisFrame
- mp.game.ui.showLoadingPrompt
- mp.game.ui.showWeaponWheel
- mp.game.ui.toggleStealthRadar