Open pedroxvb opened 7 years ago
Hello I know I am almost a year late, but better late than never! I managed to fix this script with just a few small edits
for k, v in pairs( self.items ) do
if player:HasItem( k, v ) then
if player:getChar():getInv():getItemCount(k) < v then
return false
end
end
if !player:HasItem( k, v ) then
return false
end
end
return true
when you craft something, that has multiple items, for example i want to do that :
It is actually set to use 2 bones to craft a skull, but it doesn't work, the craft is successfull even if i use only one bone. I mean if i use 2 bones they both disapear from my inventory and i got the skull but if i use only one bone it will give me the skull aswell and remove the single bone. I'm sorry for terrible explanation, i'm not very good at explaining things. Can you help me with this i don't know what i need to change in the code to make it properly work, i know i need to modify something in this area but i'm new to lua and i don't know how to fix this myself :
Hope it is clear, and thanks for any help by advance :).