Hello!
I have been trying to wrap my brain around this as it works for legitimately every firearm I have placed except for these new MK2 weapons… This is my script snippets:
For the attachments. I cannot purchase them because the script is looking to compare hash-codes… They are clearly the same but FiveM seems to be changing the HashKey every time the server restarts. I found this out by printing out the hash-key to the console client-side and also server-side… Would this be a FiveM Bug or has anyone else been able to figure out this?
Any help is appreciated!
["MK2 Pistol"] = {
{name = "Flashlight", value = "COMPONENT_AT_PI_FLSH_02", price = 200, weapon_hash = 3219281620},
{name = "Camo", value = "COMPONENT_PISTOL_MK2_CAMO_10", price = 200, weapon_hash = 3219281620}
},
For the store itself:
{ name = "MK2", type = "weapon", hash = 3219281620, price = 1250, legality = "legal", quantity = 1, weight = 15 },
EDIT:
I was able to bypass the check for haskey by giving it what the server THINKS is the hashkey: -1075685676
… But still the attachments do not go on.