Native REDM SetRandomOutfitVariationNative REDM SetRandomOutfitVariation
--  SetRandomOutfitVariation  0x283978A15512B2FE  _SET_RANDOM_OUTFIT_VARIATION
   
SetRandomOutfitVariation(
	ped --[[ Ped ]], 
	p1 --[[ boolean ]]
)

Citizen.Invoke value:

0x283978A15512B2FE

Parameters:

ped:

EntityId

p1:

Set to true, and it gives you a random outfit for the ped. It seems to go through an internal list when set to true. When set to false it seems to just give the first entry in the list repeatedly.

Returns:

Nothing

Summary

This function equips an outfit onto the ped. It does not appear to be truly random, but rather follows a list, or defaults to the first item on the list.

Example

--- Example 1 -- 
Citizen.InvokeNative(0x283978A15512B2FE, EntityID, true) -- SetRandomOutfitVariation

--- Example 2 -- 
function SetRandomOutfitVariation(ped, p1)
	Citizen.InvokeNative(0x283978A15512B2FE, ped, p1)
end
SetRandomOutfitVariation(EntityID, true)


Additional natives used in this example, or natives commonly used with this native.

Common Errors or Problems

Problem: Throws an error about the function SetRandomOutfitVariation being nil. This error means that in your setup that function does not have a human readable named function. Your choices are to use Citizen.InvokeNative where you need it (Example 1) or add a named function which uses InvokeNative (Example 2).

Problem: How do I get the entityid? Option 1: When you use CreatePed it returns the EntityID.

Problem: Unknown. Please let us know if you encounter any problems.

Credits and Disclaimers

The base of this data was taken from the redm/cfx fivem/rdr docs, or from the redm natives database hosted on vespura while it was active. We will be modifying the notes as needed, and building tutorials around the data so these pages will change as we work on it. This is a manual process, not an automated one, so updates will occur as we have time, the priority is releasing resources. Thanks for your patience.

Was the documentation useful?

0
SetRandomOutfitVariation - Native

Do you understand the native?

You will be redirected

Related Examples and Posts

No posts found.

By MK