Skip to content
View in the app

A better way to browse. Learn more.

RDR2Mods.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Need help: Ped Texture Overlay not showing ( _ADD_TEXTURE_LAYER )

Featured Replies

Hi everyone, im trying to apply the ped overlay in C++ i have read and tried these:

Ped Modification and MetaData Overview - Outfits, Assets, Expressions, Shop Items, Overlays, etc - RedM Resource Development / Modding Tutorials - Cfx.re Community

rdr3_discoveries/clothes/change_overlays_script.lua at master · femga/rdr3_discoveries · GitHub

Heres my code:

int componentNum = PED::_GET_NUM_COMPONENTS_IN_PED(playerPed);

Hash targetCategory = MISC::GET_HASH_KEY("heads");

int componentIndex = -1;

for (int i = 0; i < componentNum; i++) {
				Any componentCategory = PED::_0x9B90842304C938A7(playerPed, i, 0);
				//UIUtil::PrintSubtitle("componentCategory " + std::to_string(componentCategory));
				//WAIT(300);
				if (componentCategory == targetCategory)
				{
					componentIndex = i;
				}
}

// 1. Declare the variables to hold the results
Hash drawable, albedo, normal, material;

//// 2. Pass the addresses of those variables using &
BOOL success = PED::GET_META_PED_ASSET_GUIDS(playerPed, componentIndex, &drawable, &albedo, &normal, &material);

//// 3. Use the values
if (success) {
				// Example: Print or compare the hashes
				UIUtil::PrintSubtitle("drawable " + std::to_string(drawable)
					+ " albedo " + std::to_string(albedo)
					+ " normal " + std::to_string(normal)
					+ " material " + std::to_string(material)
				);
}
//mp_u_faov_lipstick_000_ab",normal="mp_u_faov_lipstick_000_nm",ma="mp_u_faov_lipstick_000_ma",}, 


//Hash textureHashID = 0x887E11E0;
////change to id not albedo ?
//Hash normalName = MISC::GET_HASH_KEY("mp_u_faov_lipstick_000_nm");
//Hash materialName = MISC::GET_HASH_KEY("mp_u_faov_lipstick_000_ma");


Hash textureHashID = 0x887E11E0;

Hash normalName = 0;
Hash materialName = 0;



int textureID = PED::_REQUEST_TEXTURE(albedo, normal, material);
int overlayID = PED::_ADD_TEXTURE_LAYER(textureID,
				//albedoName,
				textureHashID,
				normalName,
				materialName,
				/*	MISC::GET_HASH_KEY("mp_u_faov_lipstick_000_nm"),
					MISC::GET_HASH_KEY("mp_u_faov_lipstick_000_ma"),*/
				0, 1.0, 0);

PED::_SET_TEXTURE_LAYER_PALLETE(textureID, overlayID, 0x3F6E70FF);
PED::_SET_TEXTURE_LAYER_TINT(textureID, overlayID, 100, 110,120 );

PED::_SET_TEXTURE_LAYER_SHEET_GRID_INDEX(textureID, overlayID, 2);
PED::_SET_TEXTURE_LAYER_ALPHA(textureID, overlayID, 1.0f);

while(!PED::_IS_TEXTURE_VALID(textureID)) {
				WAIT(0);
}



PED::_APPLY_TEXTURE_ON_PED(playerPed, MISC::GET_HASH_KEY("heads"), textureID);
PED::_UPDATE_PED_TEXTURE(textureID);
PED::_0xAAB86462966168CE(playerPed,0);
PED::_UPDATE_PED_VARIATION(playerPed, 0, 1, 1, 1, false);

im trying to apply lipstick to my character (only that for now), and i got textureId which is always 65536, overlayID is 1

i have no idea what its wrong or missing here. Nothing shows up.

If u have any ideas, solutions, i would love to hear them

Thank you

this is scripthook

I have Online Content Unlocker + LML

RedM works but not Singleplayer

Edited by leavefor

  • leavefor changed the title to Need help: Ped Texture Overlay not showing ( _ADD_TEXTURE_LAYER )

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.