Skip to Content

Text Formatting

GTA V uses special formatting codes in text strings for colours, input prompts, and text styling. These work in notifications, help text, and other UI elements.

Quick Usage

-- Coloured notification BeginTextCommandThefeedPost("STRING") AddTextComponentSubstringPlayerName("~r~ALERT: ~s~Something happened!") EndTextCommandThefeedPostTicker(false, false) -- Show input prompt in help text BeginTextCommandDisplayHelp("STRING") AddTextComponentSubstringPlayerName("Press ~INPUT_CONTEXT~ to interact") EndTextCommandDisplayHelp(0, false, true, -1)
// JavaScript equivalent BeginTextCommandThefeedPost("STRING"); AddTextComponentSubstringPlayerName("~r~ALERT: ~s~Something happened!"); EndTextCommandThefeedPostTicker(false, false);

All Formatting Codes

35 entries
CodeDescriptionExample
~r~Red text~r~This is red
~b~Blue text~b~This is blue
~g~Green text~g~This is green
~y~Yellow text~y~This is yellow
~p~Purple text~p~This is purple
~o~Orange text~o~This is orange
~c~Grey text~c~This is grey
~m~Dark grey text~m~This is dark grey
~u~Black text~u~This is black
~n~New lineLine 1~n~Line 2
~s~Reset/default color~r~Red ~s~Default
~w~White text~w~This is white
~h~Bold/highlight~h~Bold text
~italic~Italic text~italic~Italic text
~t~Tab/indent~t~Indented text
~nrt~New line + reset + tabText~nrt~New line
~ws~SpaceWord~ws~Word
~wanted_star~Wanted star icon~wanted_star~
~tinv~Transparent text~tinv~Hidden
~1~Reset #1Text~1~
INPUT_CONTEXTInput button promptPress ~INPUT_CONTEXT~
INPUT_FRONTEND_ACCEPTAccept button~INPUT_FRONTEND_ACCEPT~
INPUT_VEH_EXITExit vehicle button~INPUT_VEH_EXIT~
INPUT_SPRINTSprint buttonHold ~INPUT_SPRINT~
INPUT_JUMPJump buttonPress ~INPUT_JUMP~
INPUT_ATTACKAttack buttonPress ~INPUT_ATTACK~
INPUT_AIMAim buttonHold ~INPUT_AIM~
INPUT_DUCKDuck buttonPress ~INPUT_DUCK~
INPUT_SELECT_WEAPONWeapon wheelOpen ~INPUT_SELECT_WEAPON~
INPUT_CELLPHONE_UPPhone upPress ~INPUT_CELLPHONE_UP~
INPUT_ENTEREnter vehiclePress ~INPUT_ENTER~
INPUT_VEH_ACCELERATEAccelerateHold ~INPUT_VEH_ACCELERATE~
INPUT_VEH_BRAKEBrakeHold ~INPUT_VEH_BRAKE~
INPUT_VEH_HORNHornPress ~INPUT_VEH_HORN~
INPUT_VEH_HANDBRAKEHandbrakePress ~INPUT_VEH_HANDBRAKE~