My bad, i read weapons and assumed it was normal weapons.
Anyway, your code is right by the tutorial i think.
Here's how i fixed it (my costume weapon system uses value3 to identify the type of weapon):
Search for (inside the "elif itemSubType == 3: #weapon") :
if player.GetRace() != 7 and player.GetRace() != 3:
self.__ModelPreview(itemVnum, 3, player.GetRace())
if player.GetRace() == 5 or player.GetRace() == 1:
self.__ModelPreview(itemVnum, 3, player.GetRace())
if player.GetRace() == 0 or player.GetRace() == 4:
self.__ModelPreview(itemVnum, 3, player.GetRace())
if player.GetRace() == 7 or player.GetRace() == 3:
self.__ModelPreview(itemVnum, 3, player.GetRace())
Replace with:
if item.WEAPON_SWORD == item.GetValue(3):
if player.GetRace() != 7 and player.GetRace() != 3:
self.__ModelPreview(itemVnum, 3, player.GetRace())
if item.WEAPON_DAGGER == item.GetValue(3) or item.WEAPON_BOW == item.GetValue(3):
if player.GetRace() == 5 or player.GetRace() == 1:
self.__ModelPreview(itemVnum, 3, player.GetRace())
if item.WEAPON_TWO_HANDED == item.GetValue(3):
if player.GetRace() == 0 or player.GetRace() == 4:
self.__ModelPreview(itemVnum, 3, player.GetRace())
if item.WEAPON_BELL == item.GetValue(3) or item.WEAPON_FAN == item.GetValue(3):
if player.GetRace() == 7 or player.GetRace() == 3:
self.__ModelPreview(itemVnum, 3, player.GetRace())
The piece of code you had is just randomly checking if you are a race or another and setting the weapon in the model.
This fix checks the weapon you're using and if the race you are can use that type of weapon.
Let me know if it works.