Quite simple really, I want to give the ability for select attachments to be used in the police armoury, I’m trying to miss out things like silencers and drum mags, I assumed that adding “nil” into the attachment prices would just skip that attachment, but it ends the list afaik, here’s the code;
{ weapon = ‘WEAPON_SMG’, components = { 0, 0, nil, 0, 8000, nil, nil }, price = 15000 },
I was basing it off of the es_extended config.weapons and the SMG shows like so in code;
name = ‘WEAPON_SMG’,
label = _U(‘weapon_smg’),
components = {
{ name = ‘clip_default’, label = _U(‘component_clip_default’), hash = GetHashKey(‘COMPONENT_SMG_CLIP_01’) },
{ name = ‘clip_extended’, label = _U(‘component_clip_extended’), hash = GetHashKey(‘COMPONENT_SMG_CLIP_02’) },
{ name = ‘clip_drum’, label = _U(‘component_clip_drum’), hash = GetHashKey(‘COMPONENT_SMG_CLIP_03’) },
{ name = ‘flashlight’, label = _U(‘component_flashlight’), hash = GetHashKey(‘COMPONENT_AT_AR_FLSH’) },
{ name = ‘scope’, label = _U(‘component_scope’), hash = GetHashKey(‘COMPONENT_AT_SCOPE_MACRO_02’) },
{ name = ‘suppressor’, label = _U(‘component_suppressor’), hash = GetHashKey(‘COMPONENT_AT_PI_SUPP’) },
{ name = ‘luxary_finish’, label = _U(‘component_luxary_finish’), hash = GetHashKey(‘COMPONENT_SMG_VARMOD_LUXE’) }
}
How do I skip an attachment or should I just shuffle the order of the attachments in the weapon config.
Thanks.