-- LUA Script - precede every function and global member with lowercase name of script + '_main' g_planet = {} planets = 8 location_name = {} local tt = {} local locations_set = nil function transporttoplanet_init(e) end function transporttoplanet_main(e) if locations_set == nil then locations_set = -1 return elseif locations_set == -1 then for a,_ in pairs (location_name) do for b = 1, planets do if location_name[a] == "g_planet"..b then tt[b] = a break end end end locations_set = 1 elseif locations_set == 1 then if g_Entity[e]['plrinzone'] == 1 then for a = 1,planets do if g_planet[a] == 1 then SetFreezePosition(g_Entity[tt[a]]['x'],g_Entity[tt[a]]['y'],g_Entity[tt[a]]['z']) SetFreezeAngle(g_Entity[tt[a]]['anglex'],g_Entity[tt[a]]['angley'],g_Entity[tt[a]]['z']) TransportToFreezePosition() g_planet[a] = 0 break end end end --Prompt(location_name[tt[1]]) end end