deletedacc Posted May 4, 2020 Share Posted May 4, 2020 (edited) i insert This Codes but it does'nt worked: function weaponTake () createPickup (3334.8000488281, -7807.5, 673.79998779297, 2, 9, 1, 200) createPickup (3332.8000488281, -7805.5, 673.79998779297, 2, 24, 1, 200) createPickup (3330.8000488281, -7803.5, 673.79998779297, 2, 27, 1, 200) createPickup (3328.8000488281, -7801.5, 673.79998779297, 2, 29, 1, 200) createPickup (3326.8000488281, -7799.5, 673.79998779297, 2, 31, 1, 200) createPickup (3324.8000488281, -7797.5, 673.79998779297, 2, 34, 1, 200) createPickup (3322.8000488281, -7895.5, 673.79998779297, 2, 16, 1, 200) end addEventHandler("onResourceStart", root, weaponTake) what can i do?? oh and when i create a pickup on MTA map editor it have'nt alpha help me plz Edited May 4, 2020 by DANFOR Link to comment
Moderators Patrick Posted May 4, 2020 Moderators Share Posted May 4, 2020 You should use it on server side, and you need to replace root to resourceRoot otherwise pickups are created when any resource started. Link to comment
deletedacc Posted May 4, 2020 Author Share Posted May 4, 2020 that's on server side and i replaced root to resourceRoot. it does'nt worked again. can you tell me why pickups have'nt alpha on MTA map editor??before trying to make pickups with script i tryed to make pickups with MTA map editor. that was worked but it have'nt alpha. pls hlp me, thanks allright allrigh allright ! i maked a pickup with script and it works ! my problem was position but still it have'nt alpha can you help me? Link to comment
NoviceWithManyProblems Posted May 4, 2020 Share Posted May 4, 2020 (edited) use /debugscript 3 and watch errors after starting script and look at Required Arguments here: https://wiki.multitheftauto.com/wiki/CreatePickup or just use: https://wiki.multitheftauto.com/wiki/SetElementAlpha untested, but I think that will works local pickups = { {3334.8000488281, -7807.5, 673.79998779297, 2, 9, 1, 200}, {3332.8000488281, -7805.5, 673.79998779297, 2, 24, 1, 200}, {3330.8000488281, -7803.5, 673.79998779297, 2, 27, 1, 200}, {3328.8000488281, -7801.5, 673.79998779297, 2, 29, 1, 200}, {3326.8000488281, -7799.5, 673.79998779297, 2, 31, 1, 200}, {3324.8000488281, -7797.5, 673.79998779297, 2, 34, 1, 200}, {3322.8000488281, -7895.5, 673.79998779297, 2, 16, 1, 200} } for k,v in ipairs(pickups) do createPickup(v[1], v[2], v[3], v[4], v[5], v[5], v[6], v[7]) setElementAlpha(v, 255) end Edited May 4, 2020 by NoviceWithManyProblems Link to comment
Anx1ty Posted May 5, 2020 Share Posted May 5, 2020 (edited) Hey, check if it works local weapSpawn = { {3334.8000488281, -7807.5, 673.79998779297, 2, 9, 1, 200}, {3332.8000488281, -7805.5, 673.79998779297, 2, 24, 1, 200}, {3330.8000488281, -7803.5, 673.79998779297, 2, 27, 1, 200}, {3328.8000488281, -7801.5, 673.79998779297, 2, 29, 1, 200}, {3326.8000488281, -7799.5, 673.79998779297, 2, 31, 1, 200}, {3324.8000488281, -7797.5, 673.79998779297, 2, 34, 1, 200}, {3322.8000488281, -7895.5, 673.79998779297, 2, 16, 1, 200}, } local data = false for i = 1, #weapSpawn do data = weapSpawn[i] createPickup(data[1], data[2], data[3], data[4], data[5], data[6], data[7]) end Edited May 5, 2020 by !#NssoR_) 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