murilo2929 Posted September 4, 2019 Share Posted September 4, 2019 So, I'm making a skin pickup on my server and I'm trying to make sure that when the player already has a skin it is removed from inventory, but the problem is that when the skin is in inventory and goes through the pickup it is not removed. . thePickup = createPickup ( -32.2197265625, -138.232421875, 1003.546875, 3, 1275, 1000 ) setElementDimension(thePickup, 72) setElementInterior(thePickup, 16) function testepickup ( thePlayer ) if exports.dota:hasitm( thePlayer, 1, 50) then exports.dota:takeitm( thePlayer, 1 50) end local theTeam = getPlayerTeam(thePlayer) local factionType = getElementData(theTeam, "type") if factionType==90 then exports.dota:giveitm( thePlayer, 1, 50 ) end end addEventHandler ( "onPickupUse", thePickup, testepickup ) OBS : remembering that the player can only get the skin if it is faction 90 OBS²: I was seeing that if I am not in the faction while picking up the skin in the inventory it is removed normally, but when I am in the faction it is not removed. Link to comment
Moderators IIYAMA Posted September 4, 2019 Moderators Share Posted September 4, 2019 Looks like a typo: exports.dota:takeitm( thePlayer, 1 <missing: , > 50) Link to comment
murilo2929 Posted September 4, 2019 Author Share Posted September 4, 2019 21 minutes ago, IIYAMA said: Looks like a typo: exports.dota:takeitm( thePlayer, 1 <missing: , > 50) I fix it, but not changed, Still not taking the skin off the inventory when you have it, only when I am not in the faction. Link to comment
Moderators IIYAMA Posted September 4, 2019 Moderators Share Posted September 4, 2019 1 hour ago, murilo2929 said: I fix it, but not changed, Still not taking the skin off the inventory when you have it, only when I am not in the faction. What are you waiting for? You know which function is not working properly and yet you are only looking at your own resource? Question for yourself: What are the conditions and expected returned results of the takeitm function? 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now