Hi, I’ve just been looking for a native that can for example put helmets on firemen,
I’m writing a command ‘/fireon’ and was curious if there is a native for props, similar to the GiveWeaponComponentToPed
Hi, I’ve just been looking for a native that can for example put helmets on firemen,
I’m writing a command ‘/fireon’ and was curious if there is a native for props, similar to the GiveWeaponComponentToPed
void SET_PED_PROP_INDEX(Ped ped, int componentId, int drawableId, int TextureId, BOOL attach) // 93376B65A266EB5F 0829F2E2
ComponentId can be set to various things based on what category you're wanting to set
enum PedPropsData
{
PED_PROP_HATS = 0,
PED_PROP_GLASSES = 1,
PED_PROP_EARS = 2,
};
Usage: SET_PED_PROP_INDEX(playerPed, PED_PROP_HATS, GET_NUMBER_OF_PED_PROP_DRAWABLE_VARIATIONS(playerPed, PED_PROP_HATS), GET_NUMBER_OF_PED_PROP_TEXTURE_VARIATIONS(playerPed, PED_PROP_HATS, 0), TRUE);
List of component/props ID
gtaxscripting.blogspot.com/2016/04/gta-v-peds-component-and-props.html
So for example the helmet on the firemen would be something like
RegisterNetEvent("fireHelmet")
AddEventHandler("fireHelmet",function()
local model = GetHashKey("s_m_y_fireman_01")
RequestModel(model)
while not HasModelLoaded(model) do
RequestModel(model)
Citizen.Wait(0)
end
SetPlayerModel(PlayerId(), model)
SetModelAsNoLongerNeeded(model)
local ped = PlayerPedId()
SetPedPropIndex(GetPlayerPed(-1), 0, 0, 0, 2)
end)
where does this code go??
Into a client file… where else?
Idk… I’m looking at how to make props work with add on peds, I think i’m in the wrong place lol
Then go to the addon topic.