RedM Development: Adding Prisoner Outfits to Peds

Published on
3 mins read
--- views
RDR2 RedM Prisoner outfit free script

When developing prison-related content for RedM, you might need to programmatically apply prisoner outfits to peds. This snippet provides a simple function to dress any ped in a prisoner outfit, with automatic gender detection and appropriate clothing selection.

The Code

Here's the complete function for applying prisoner outfits:

function ApplyPrisionerOutift(ped)
    -- Remove existing clothing components
    Citizen.InvokeNative(0xDF631E4BCE1B1FC4, ped, 0x3F7F3587, true, true, true)
    Citizen.InvokeNative(0xDF631E4BCE1B1FC4, ped, 0x49C89D9B, true, true, true)
    Citizen.InvokeNative(0xDF631E4BCE1B1FC4, ped, 0x4A73515C, true, true, true)
    Citizen.InvokeNative(0xDF631E4BCE1B1FC4, ped, 0x514ADCEA, true, true, true)
    Citizen.InvokeNative(0xDF631E4BCE1B1FC4, ped, 0x5FC29285, true, true, true)
    Citizen.InvokeNative(0xDF631E4BCE1B1FC4, ped, 0x79D7DF96, true, true, true)
    Citizen.InvokeNative(0xDF631E4BCE1B1FC4, ped, 0x7A96FACA, true, true, true)
    Citizen.InvokeNative(0xDF631E4BCE1B1FC4, ped, 0x877A2CF7, true, true, true)
    Citizen.InvokeNative(0xDF631E4BCE1B1FC4, ped, 0x9925C067, true, true, true)
    Citizen.InvokeNative(0xDF631E4BCE1B1FC4, ped, 0x485EE834, true, true, true)
    Citizen.InvokeNative(0xDF631E4BCE1B1FC4, ped, 0x18729F39, true, true, true)
    Citizen.InvokeNative(0xDF631E4BCE1B1FC4, ped, 0x3107499B, true, true, true)
    Citizen.InvokeNative(0xDF631E4BCE1B1FC4, ped, 0x3C1A74CD, true, true, true)
    Citizen.InvokeNative(0xDF631E4BCE1B1FC4, ped, 0x3F1F01E5, true, true, true)
    Citizen.InvokeNative(0xDF631E4BCE1B1FC4, ped, 0x9B2C8B89, true, true, true)
    Citizen.InvokeNative(0xDF631E4BCE1B1FC4, ped, 0xA6D134C6, true, true, true)
    Citizen.InvokeNative(0xDF631E4BCE1B1FC4, ped, 0xE06D30CE, true, true, true)
    Citizen.InvokeNative(0xDF631E4BCE1B1FC4, ped, 0x662AC34, true, true, true)
    Citizen.InvokeNative(0xDF631E4BCE1B1FC4, ped, 0xAF14310B, true, true, true)
    Citizen.InvokeNative(0xDF631E4BCE1B1FC4, ped, 0x72E6EF74, true, true, true)
    Citizen.InvokeNative(0xDF631E4BCE1B1FC4, ped, 0xEABE0032, true, true, true)
    Citizen.InvokeNative(0xDF631E4BCE1B1FC4, ped, 0x2026C46D, true, true, true)
    Citizen.InvokeNative(0xDF631E4BCE1B1FC4, ped, 0xB6B6122D, true, true, true)
    Citizen.InvokeNative(0xDF631E4BCE1B1FC4, ped, 0xB9E2FA01, true, true, true)

    -- Apply gender-specific prisoner outfits
    if IsPedMale(ped) then
        -- Male prisoner outfit components
        Citizen.InvokeNative(0xD3A7B003ED343FD9, ped, 0x5BA76CCF, true, true, true)
        Citizen.InvokeNative(0xD3A7B003ED343FD9, ped, 0x216612F0, true, true, true)
        Citizen.InvokeNative(0xD3A7B003ED343FD9, ped, 0x1CCEE58D, true, true, true)
    else
        -- Female prisoner outfit components
        Citizen.InvokeNative(0xD3A7B003ED343FD9, ped, 0x6AB27695, true, true, true)
        Citizen.InvokeNative(0xD3A7B003ED343FD9, ped, 0x75BC0CF5, true, true, true)
        Citizen.InvokeNative(0xD3A7B003ED343FD9, ped, 0x14683CDF, true, true, true)
    end
end

How It Works

The function operates in two main steps:

  1. Clearing Existing Clothing

    • Uses 0xDF631E4BCE1B1FC4 native to remove all existing clothing components
    • Each hex value represents a specific clothing component that needs to be removed
    • This ensures the prisoner outfit will be applied correctly without any clipping issues
  2. Applying Prison Outfit

    • Checks the ped's gender using IsPedMale()
    • Uses 0xD3A7B003ED343FD9 native to apply the appropriate prisoner outfit components
    • Different components are applied based on gender:
      • Male: Three specific components (0x5BA76CCF, 0x216612F0, 0x1CCEE58D)
      • Female: Three specific components (0x6AB27695, 0x75BC0CF5, 0x14683CDF)

Usage

To apply the prisoner outfit to a ped, simply call the function with the ped handle:

-- Apply to player ped
local playerPed = PlayerPedId()
ApplyPrisionerOutift(playerPed)

-- Or apply to any other ped
local somePed = GetRandomPedAtCoord(x, y, z, range, range, range, 26)
ApplyPrisionerOutift(somePed)

Notes

  • The function automatically handles both male and female peds
  • All existing clothing components are removed first to prevent clipping
  • The outfit components are hardcoded using hex values that correspond to specific RedM clothing items
  • The function uses the Citizen.InvokeNative method to call RedM natives

Common Issues

  1. Outfit Not Appearing

    • Make sure the ped exists and is valid
    • Verify that all component removals are successful
    • Check if the gender detection is working correctly
  2. Clipping Issues

    • Ensure all existing clothing components are properly removed
    • Verify that the correct gender-specific components are being applied

Conclusion

This snippet provides a reliable way to apply prisoner outfits to peds in RedM. It's particularly useful for prison-related roleplay scenarios, missions, or any situation where you need to dress characters as prisoners. The code handles both male and female peds automatically and ensures proper removal of existing clothing to prevent visual glitches.

Join Our Community!

Get help, share ideas, get free scripts, and connect with other RedM enthusiasts in our Discord server.

Join Discord