Hello guys,stuck on a problem.Heres code i wrote:
items = {
{1337,1356.69360,1546.84326,10.82031},
{1337,1356.59802,1536.86560,10.8203},
{1337,1368.62585,1547.30847,10.82031}
}
function spawnLoot()
local object ,x, y, z = unpack ( items [ math.random ( #items ) ] )
createObject ( object,x,y,z,0,0,0)
end
addEventHandler ( "onResourceStart", getRootElement(), spawnLoot)
problem is that script spawns only one object.What i want to do,is spawn multiple of them(for example spawn object at first and third point)
Thank you)