#RooTs Posted May 22, 2014 Share Posted May 22, 2014 can someone give me an example of how would table of position of objects and how shall multiply the object in table local x, y, z = { "1548", "-1681", "13" } createPickup ( x, y, z, 3, 1239, 60000 ) Link to comment
justn Posted May 22, 2014 Share Posted May 22, 2014 local Positions = { { 1548, 1681, 13 }, --{ x, y, z }, } for index = 1, #Positions do Pickup = createPickup ( Positions [ index ] [ 1 ], Positions [ index ] [ 2 ], Positions [ index ] [ 3 ], 3, 1239, 60000 ) end Link to comment
#RooTs Posted May 22, 2014 Author Share Posted May 22, 2014 what is wrong aii? local Positions = { { 653.35773, -1769.18567, 13.57368 }, --{ x, y, z }, } for index = 1, #Positions do local test = createPickup ( Positions [ index ] [ 1 ], Positions [ index ] [ 2 ], Positions [ index ] [ 3 ], 3, 1239, 10000 ) addEventHandler("onPickupHit",test, function(player) --setPlayerWantedLevel(player,getPlayerWantedLevel(player)-1) --setPedSkin ( player, 271 ) --skin giveWeapon(player, 24, 200, true) armar --setElementHealth(player, 100) --vida --setPedArmor(player, 90) --colete end end) Link to comment
justn Posted May 22, 2014 Share Posted May 22, 2014 local Positions = { { 653.35773, -1769.18567, 13.57368 }, --{ x, y, z }, } for index = 1, #Positions do local test = createPickup ( Positions [ index ] [ 1 ], Positions [ index ] [ 2 ], Positions [ index ] [ 3 ], 3, 1239, 10000 ) end addEventHandler("onPickupHit",resourceRoot, function(player) --setPlayerWantedLevel(player,getPlayerWantedLevel(player)-1) --setPedSkin ( player, 271 ) --skin giveWeapon(player, 24, 200, true) -- --setElementHealth(player, 100) --vida --setPedArmor(player, 90) --colete end ) Link to comment
#RooTs Posted May 24, 2014 Author Share Posted May 24, 2014 very thanks I will only have this problem now viewtopic.php?f=91&t=75298&start=45 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