Byronity Posted February 2, 2017 Share Posted February 2, 2017 The problem is that no matter what i do, i can't get the pickup to attach to the player. The pickup is created but it doesn't attach before i change my skin. And is there a way to disable to pick up the pickups? because whenever they are created, they are consumed by the player. (The pickup is too close to the player upon the attachment and thus is consumed by the player upon attachment) local pickup = {} addEvent("createPickup",true) addEventHandler("createPickup",root, function (client, icon) if isElement(pickup[client]) then destroyElement(pickup[client]) end local x, y, z = getElementPosition(client) pickup[client] = createPickup(x, y, z, 3, tonumber(icon)) if pickup[client] then attachElements(pickup[client], client, 0, 0, 1.5) end end) Link to comment
#BrosS Posted February 2, 2017 Share Posted February 2, 2017 use bone-attach script Best way to attach elements automaticly Link to comment
Byronity Posted February 3, 2017 Author Share Posted February 3, 2017 I tried that actually but it's not as stable as attachElements. Do you have any other ideas? Afaik, i can't disable the ability to pick up the pickups, so if i can't find another solution, i might recreate the script, create the pickups as objects, disable the collisions and rotate it to create the illusion of the pickup. Link to comment
ViRuZGamiing Posted February 4, 2017 Share Posted February 4, 2017 I suppose cancelling onPlayerPickupHit doesn't help? Link to comment
Aimcac Posted February 4, 2017 Share Posted February 4, 2017 17 hours ago, ViRuZGamiing said: I suppose cancelling onPlayerPickupHit doesn't help? onPickupHit* should cancel the use of the pickup. 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