Hello guys, i need help . I want to create a copy of the magic wand for each spell with code.
i know i need to use Weapon.Register but i don't know how
for k,v in pairs(spellsnames) do
local SWEP = weapons.Get("magic_wand_original")
SWEP.PrintName = "Magic wand(".. v ..")"
weapon.Register(SWEP, "magic_wand".. k .."")
end
it's create copies but they don't work in spawnmenu they have names but when i spawn them , it's gives a wand with name of last spell in table spellsnames
P.s
spellsnames - table with names of spell
like
1- Abra kadabra
Use table.Copy(weapons.GetStored("magic_wand_original")) instead of weapons.Get. Also, you're calling weapon.Register instead of weapons.Register - check your console for errors next time.
Sorry, you need to Log In to post a reply to this thread.