GivePedHelmet
DocsGivePedHelmet(ped, cannotRemove, helmetFlag, textureIndex)Description
Gives the ped a helmet. Can be removed by invoking <code>REMOVE_PED_HELMET</code>.
enum ePedCompFlags {
PV_FLAG_NONE = 0, // 0
PV_FLAG_BULKY = 1, // 1<<0
PV_FLAG_JOB = 2, // 1<<1
PV_FLAG_SUNNY = 4, // 1<<2
PV_FLAG_WET = 8, // 1<<3
PV_FLAG_COLD = 16, // 1<<4
PV_FLAG_NOT_IN_CAR = 32, // 1<<5
PV_FLAG_BIKE_ONLY = 64, // 1<<6
PV_FLAG_NOT_INDOORS = 128, // 1<<7
PV_FLAG_FIRE_RETARDENT = 256, // 1<<8
PV_FLAG_ARMOURED = 512, // 1<<9
PV_FLAG_LIGHTLY_ARMOURED = 1024, // 1<<10
PV_FLAG_HIGH_DETAIL = 2048, // 1<<11
PV_FLAG_DEFAULT_HELMET = 4096, // 1<<12
PV_FLAG_RANDOM_HELMET = 8192, // 1<<13
PV_FLAG_SCRIPT_HELMET = 16384, // 1<<14
PV_FLAG_FLIGHT_HELMET = 32768, // 1<<15
PV_FLAG_HIDE_IN_FIRST_PERSON = 65536, // 1<<16
PV_FLAG_USE_PHYSICS_HAT_2 = 131072, // 1<<17
PV_FLAG_PILOT_HELMET = 262144 // 1<<18
};Parameters
| Name | Type | Description |
|---|---|---|
ped | Ped | Ped index. |
cannotRemove | BOOL | Can remove helmet or not. |
helmetFlag | int | Flag for the helmet, the helmet appearance depends on the ped it's being applied on. |
textureIndex | int | Texture index; any value other than `-1` will overwrite the default texture index. The helmet texture index needs to be valid for it to be applied. |
Quick Snippet: Get Ped Handleped
pedUse this to get the player ped handle for this native.
-- Get the player's ped handle (client-side)
local ped = PlayerPedId()
print("Ped handle: " .. ped)
-- For a specific player's ped (server-side):
-- local targetPed = GetPlayerPed(source)Ped Models

mp_m_freemode_01
player_zero
ig_agatha
s_m_y_cop_01
s_m_m_gaffer_01
g_m_m_armboss_01
a_c_boar
a_m_m_bevhills_01Returns
voidThis native does not return a value.