Protagonist95 Posted February 14, 2016 Share Posted February 14, 2016 So heres script that i made,cant get what seems to be the problem local objectSpawn = { {1343.36511,1541.53662,10.82031}, {1344.08984,1531.10254,10.82031}, {1350.97217,1535.13367,10.82031} } function SpawnPicks ( ) for i,v in ipairs(objectSpawn) do local x,y,z = objectSpawn[1],objectSpawn[2],objectSpawn[3] createObject(1337,x,y,z,nil,nil,nil) end end addEventHandler ( "onResourceStart", resourceRoot, SpawnPicks ) Link to comment
SpecT Posted February 14, 2016 Share Posted February 14, 2016 This should work. local objectSpawn = { {1343.36511,1541.53662,10.82031}, {1344.08984,1531.10254,10.82031}, {1350.97217,1535.13367,10.82031} } function SpawnPicks ( ) for i,v in ipairs(objectSpawn) do local x,y,z = v[1],v[2],v[3] createObject(1337,x,y,z,nil,nil,nil) end end addEventHandler ( "onResourceStart", resourceRoot, SpawnPicks ) Link to comment
Protagonist95 Posted February 14, 2016 Author Share Posted February 14, 2016 This should work. local objectSpawn = { {1343.36511,1541.53662,10.82031}, {1344.08984,1531.10254,10.82031}, {1350.97217,1535.13367,10.82031} } function SpawnPicks ( ) for i,v in ipairs(objectSpawn) do local x,y,z = v[1],v[2],v[3] createObject(1337,x,y,z,nil,nil,nil) end end addEventHandler ( "onResourceStart", resourceRoot, SpawnPicks ) yep,it doese,thank you 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